JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How to calculate the difference between two dates and a fee based on those datesAsked by DownwardDogATX on May 04, 2016 at 02:10 PM
I am trying to create a form for my dog sitting business where the user can input the dates and it will automatically calculate their total and let them pay through PayPal. Is there a way to do that? I've been playing with it for a while and I can't seem to figure it out :/
You can achieve your requirement with using our Form Calculation widget.
First you need to add 2 date fields to your form. Then add Form Calculation widget and configure it to calculate the number between two dates.
If you want to calculate the difference between today and the other date field you can set first date field’s value to default and hide it. This will set date field value to today and it will never be seen on your form.
You can find additional information about Form Calculation widget here.
Once you have the number of days calculated, you can add another calculation widget to calculate the total fee or you can include the fee calculation in your original calculation. When you have your total, you can pass that total to PayPal for payment processing: