Are you looking for a great way to get a yes or no decision from an end user? Try presenting your question in the form of a Decision box. If the user selects the box, the answer is yes. This field can have only two values - Yes or No.
The Boolean datatype is used in scripting for decision box.
Setting a field to Mandatory, forces the user to fill a value for the particular form field.
To make a field mandatory through GUI, please refer the following link.
To make a field mandatory through script,
For example, the sample script shown below indicates the user that the field value is mandatory and requires data to be entered in the field.
In the above code, input.Terms and conditions is the field where the field value is mandatory.
Now you can set a default value for a field in the form. There are two possible ways to perform this action.
To set default value for a field through GUI, please refer the following link.
You can use this option to set up dynamic values to fields. Setting today's date for a Date field, current time for a Date-Time field, logged in user's email for Email field are some examples.
This can also be used for the fields where you see the "Initial Value" option missing.
1. In the edit mode, click on workflow tab.
2. Go to On Add -> On Load script section of the Form.
3. Enter the code shown below and click on "Save script " button.
4. Now you can see the default value in the field while accessing the application.
The permission option supports the show/hide functionality to create forms that hide the information from the user or adjust the fields while the user is entering the data . There are two possible ways to perform this action.
To enable the show/hide functionality from the GUI, please refer the following link.
In the Form Actions -> on add ->on load script of the form, hide the required fields and provide restricted access to selected fields. A sample script is shown below:
In the above example, T & C refers to the field name of the decisionbox.