To dynamically set the date of an element based on the current date, please follow the instructions below. In this example, we will show you how to add 90 days to the current date.
STEP 1: Create a Date element with a data column name of date1.
STEP 2: In the dynamic value of the date1 element, put new Date(). This tells the element to default to the current date when the record is created.
STEP 3: Create another Date element with a data column name of date2.
STEP 4: In the dynamic value of the date2 element, put new Date(date1.getFullYear(), date1.getMonth(), date1.getDate() +90). This will tell the element to add 90 days to the date in the date1 element.
STEP 5: Test your functionality.
iFORM TIP: In the condition value of the date1 element, put false. This will hide the element from the user so no data can be altered.