Suppose there are two 'Datepicker' fields with the field names 'Start_Date' and 'Due_Date' respectively. The due date should display automatically once the start date is entered by adding 4 days to it. In such a case, you can use the drag and drop code editor to define a condition like below upon the 'onChange' event of the 'Start_Date' control:
Here are the steps to understand how you can define such a condition:
From the left panel, click on the option 'Custom Functions'. Select the fifth block called 'Set Value' and drag it to the centre of the editor.
In the 'Control Name', select 'Due_Date'.
From the left panel, click on the option 'Custom Functions', select the block for 'Add / Subtract Days' and replace the block for 'Value' field with this block.
Select the 'Start_Date' control name in the 'Date' field for the 'Add / Subtract Days' block and set 'No of days' to '4' instead of the default value '0'.
Next Article: Display only specific values in 'Dropdown' control based on value selection in another 'Dropdown' control of the same form