Is it possible to create a date related trigger?

  • poolmanagementgroup
    Asked on August 14, 2015 at 3: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?

  • Boris
    Replied on August 14, 2015 at 6:12 PM

    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.

    Is it possible to create a date related trigger? Image 1 Screenshot 80

    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.

    Is it possible to create a date related trigger? Image 2 Screenshot 91

    Please set the Default Date of this hidden field to Custom > today

    Is it possible to create a date related trigger? Image 3 Screenshot 102

    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.

    Is it possible to create a date related trigger? Image 4 Screenshot 113

    Is it possible to create a date related trigger? Image 5 Screenshot 124

    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).

    Is it possible to create a date related trigger? Image 6 Screenshot 135

    Is it possible to create a date related trigger? Image 7 Screenshot 146

    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:

    http://form.jotformpro.com/form/52257190296964

    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.