Virtual fields are DataPage elements that do not have underlying fields in the source table or view to store entered data. You can use them for input that will not be saved, such as “I agree” checkboxes. You can also use them to pass data to other DataPages using parameters. Virtual fields can also be used in Forms, Reports, and log-in forms configured with custom authentication.
In this article, you add a Virtual Field to an existing Submission Form to include the “I Agree” option.
- On the DataPages’ listing screen, select the Submission Form DataPage you would like to change, and click Edit.
- Proceed to the Configure Fields screen. Using the Insert button at the lower right hand corner of the DataPage Elements panel, click HTML Block. This block allows you to add the text “Terms and Conditions”. Add your text in the panel to the right. You can use HTML tags for formatting.
- Next, insert a virtual field to include the “I Agree” option. To insert a virtual field, click the Insert button again and select Virtual Field. The Virtual field will appear in the list of DataPage elements. Select the Virtual field and use the arrow buttons to move the Virtual field below the HTML block.
- Format the Virtual field as a Checkbox form element. Select Checkbox from the Form element dropdown field. Remove the label text and enter “I agree” in the Display Text. Make sure the Required checkbox is checked. Add a value of 1 into the Value when checked field.
- Configure the rest of the DataPage as normal. Click Finish to save your DataPage
Now if the end user attempts to submit the form without checking “I agree”, they will receive an error message.