Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

RSForm!Pro - Date operation

Date operation
In this article we will describe how to make some calculations with Dates. The following script will add a Date field with a numeric field.

The following fields will need to be created:

Field1 - text box with this code to the default value:
 
//<code>
return date('m/d/o');
//</code>
 
This snippet will return the current date. Of course you can also use the calendar to select a specific date.

Field2 - text box with "Numeric" validation rule

Field3 - hidden field

For the next step you will have to set the Field3 value with the result of the desired calculation. To achieve this just paste the following code in the "Scripts" tab, on "Scripts called on form process":
 
if(isset($_POST['form'])){
$_POST['form']['Field3'] = date('m/d/Y',strtotime(' +'.$_POST['form']['Field2'].' days'));
}
 
To display this result in the front-end just use the appropriate placeholder (eg. {Field3:value}).
Feedback