What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
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.
Is it possible to create a date related trigger?Asked by poolmanagementgroup on August 14, 2015 at 03:22 PM
We want to create an admin fee for people who register within X days of an event. Is there a way to auto-trigger this within the form?
create trigger register fee
If I understand you correctly, you are looking to charge an additional fee if there is less than X days until a registered event. Yes, this can be achieved by using two date fields, conditional logic, and two regular fields where we output the date difference and display the admin fee.
1. We need a visible Date field for the user to schedule their event. I can see that you already have one on your form, named Date of Party.
Note: For this field, I would recommend creating a new DateTime field, and disabling past dates - for practical reasons.
2. We need a hidden Date field that will capture the current date (today), so that we can calculate if the difference is X days or not.
Please set the Default Date of this hidden field to Custom > today
3. We need to use Conditional Logic and check the difference between days, and Update a field value of a regular field on your form - I have used a Number field. It is best to keep this field hidden from your users.
Finally, we use an Admin fee field, and set it as read only. Then, we use Conditions again to show 20 in it, if difference between dates is less than 8 (which means 7 or less).
Finally, you can use this admin fee in your desired price calculations.
I have cloned your form into my account, and made these changes as a demo:
I have also left the date field (today) and the days of difference number field visible for you, so that you can see how it works in action. I hope this helps. Please let us know if you need further assistance.