Form İçi Oto Hesaplama Fonksiyonu | In-Form Auto Calculation Function

  • Termodinamik
    17 Mayıs 2025 15:48 tarihinde soruldu

    Merhaba,


    Form içerisinde GPS veya sadece veri girişi yaparak, belirli bir kilometre üzerinde kalması durumunda otomatik olarak ücret hesaplaması yapılabilir mi?


    Şöyle bir örnek vermek gerekirse;


    Gidiş Yol: 15KM

    Geliş Yol: 15 KM


    Toplam: 30 KM


    Kural gereği, 20 km dışında kalan 10 km'lik mesafeyi otomatik olarak formda hesaplanacak.


    Bu mümkün müdür? Ya da Jotform sistemi içerisinde bu özelliği forma uyarlama imkanımız var mı?
    -----------------------------------------------------------------------------------------------------------
    Hello,


    Can the form automatically calculate the fare if it is over a certain mileage by using GPS or just entering data?


    To give an example;


    Outbound: 15KM

    Inbound: 15KM


    Total: 30KM


    According to the rule, the 10km distance outside of 20km will be automatically calculated in the form.


    Is this possible? Or is it possible to adapt this feature to the form within the Jotform system?

  • Mafe_M Jotform Support
    17 Mayıs 2025 18:34 tarihinde yanıtlandı

    Hi Termodinamik,

    Thank you for reaching out to Jotform Support. Yes, Jotform can automatically calculate a fare based on mileage using either GPS data or by entering data manually, and it can also apply a flat rate for a certain mileage. The Driving Distance widget can be used to calculate distance, and the Form Calculation widget can then be used to calculate the fare based on that distance. 

    You can add the Driving Distance widget into the form. This widget allows you to set a predetermined address set as an origination location. It also allows you to set a default distance unit (Miles) and hide the unit setting option to prevent respondents from changing it to kilometers. You can set the widget to auto calculate or have a calculate button to process the calculation. This widget is powered by Google Maps. Let me show you how to add it to your form:

    1. In Form Builder, click on Add Element on the left-hand side of the page.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 1 Screenshot 100

    2. Under the Widgets tab, click on the Driving Distance widget, and drag and drop it to your form.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 2 Screenshot 111

    3. Click the Wand icon to get to the Widget Settings.

    4. Under the General tab, set up the widget and enter the Google API key at the bottom part of the Widget Settings.

    5. Click Update to apply the changes.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 3 Screenshot 122

    It is also possible to create an automatic calculation within your form based on the mileage entered. You can set up calculation fields that sum the outbound and inbound distances, then apply a condition to subtract the threshold (20 km in your example) and calculate the fare for the distance exceeding that limit. Here’s how to do it:

    1. Add number fields for the user to input the outbound and inbound distances.

    a. In Form Builder, click on Add Element on the left-hand side of the page.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 4 Screenshot 133

    b. In the Add Element menu, under the Basic tab, scroll down to Number, and drag and drop the Number element to your form.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 5 Screenshot 144

    2. Create a calculation field that sums these two distances to get the total distance. Use the Form Calculation Widget.

    a. In Form Builder, click on the Add Form Element menu on the left side of the page.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 6 Screenshot 155

    b. Under the Widgets tab, click on the Form Calculation widget, and drag and drop it to your form.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 7 Screenshot 166

    c. Click the Wand icon to get to the Widget Settings.

    d. Click the blue Add Field button and add the Choose your subscription field as the formula.

    e. Lastly, click Save to apply the changes made.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 8 Screenshot 177

    3. Use a conditional logic to check if the total distance is greater than 20 km. If the total distance exceeds 20 km, subtract 20 from the total and calculate the fare based on the remaining distance. You can use the Update/Calculate Field conditional logic.

    Form İçi Oto Hesaplama Fonksiyonu | In Form Auto Calculation Function Image 9 Screenshot 188

    4. Display the calculated fare in a separate field for the user to see. If you want them to pay for the fare, you can use a payment integration to collect payments. You can pass the value of the form calculation widget to the payment integration.

    Regarding GPS integration, Jotform does not natively support automatic GPS distance tracking within forms. However, users can manually enter the distances, and the form will handle the calculation automatically as described.

    Give it a try and let us know how it goes.