Is it possible to create a date related trigger?

  • Profile Image
    Asked 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?

  • Profile Image
    Answered on August 14, 2015 at 06: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.

    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.