Date Dependent Logic
Last edited 11/12/2020
Combining logic with date fields can create date-dependent options, such as early and late registration rates or product sales that close after a certain day. To control when entire forms are available, see Advanced Form Settings for details on automatic scheduling.
First, your form will need a date field to build logic upon.
- In Form Manager, click "Edit" to enter the form editor.
- In the brown "Add a Field" tab on the right, click on "Date" to add a date field to the bottom of your form, or drag and drop to a location of your choice.
- Click on your new date field to open its green "Field Properties" tab.
- Change the label to "Today's Date" or "Registration Date".
- Under rules, select "Read Only".
- Under "Default Date" enter "today".
- Click on "Save Form" and then "I'm finished."
Now your form is ready to adapt based on the date it is accessed by users.
Expiring fields allow you to close t-shirt sales, or other options that are not available after a certain date, while leaving the rest of your form active and functioning.
- From Form Manager, click on "Logic" to enter your form's logic builder.
- Check "Enable Rules to Show/Hide Fields" (the blue box) if it is not already enabled.
- Select the form field you would like to expire from the "Select a Field to Show/Hide" dropdown. This will create a new rule for that field. If your field already has a show/hide rule attached to it, its name will not appear in the dropdown. In that case, find the rule for that field below, and click on the blue plus-sign to add another condition. Make sure the field is set to show when "all" of the conditions match.
- In the condition line, select your date field from the first dropdown, then "Is Before" from the second.
- Click on the date picker icon next to the third box to select the day your field will become unavailable.
- Repeat for any other fields you wish to expire.
- Click "Save Settings."
Use date dependent section breaks to communicate with users and avoid confusion should they come back and find a form changed. In this example, one section break might be labeled "Shirt orders available through November 15th" and have a logic rule to show if the registration date is before 11/16/2019, while a second would be labeled "Shirt orders closed on November 15th" and have a rule to show if the registration date is after 11/15/2019.
Time-varying rates are accomplished with separate monetized fields that show on your form depending on registration date.
For example, consider a simple registration for youth and/or adults that uses checkboxes paired with number fields as described in Product Sales, and has both an early and late rate.
This example uses two sets of checkboxes and quantity fields, one set labeled "Early Rate" and the other set labeled "Late Rate." The first (early rate) checkboxes field is used with a logic rule that has it expire on a certain day, as described above. The second (late rate) checkboxes field has the reverse, a rule that has it show only after a certain day.
Then, on the form's payment page, the two checkboxes fields have different prices set in the third (green) box.
Time dependent logic works similarly to date dependent logic. A read-only time field with a default value of "now" registers the time of day a form is filled out, and can be used with logic rules.
Time fields can be adjusted for different time zones by adding or subtracting hours to "now." For example, a default time of "now -1 hour" adjusts a form to Central Standard/Daylight Time.