You can validate field data without writing any script. The LitCrit form uses data validation to verify that a title and an overall rating have been entered. These types of simple data validation — such as determining whether a field is empty or holds its default value — are implemented through settings input in the Validation page of the field's Properties dialog box.
The simplest type of data validation is the requirement that a field, or a control that is bound to a field, have a value. You can also set the exact text, a range of numbers, or any other criteria for the field. You can also show a custom message (based on a validation formula) that tells users what to do if your validation criteria are not met. Validation does not occur until the user closes the form, for example by clicking Post, Send, or Close.
The two fields validated this way on the EnhancedLitCrit form are Overall Rating and Item Title. To ensure it is not empty, the Item Title is validated using the following formula:
Len(Trim([Item Title]))>0
Formulas to validate field data are input in the Properties dialog box of the field. This dialog box also lets you specify a message to be displayed if the validation fails. In the case of Item Title, the message text reads "Please enter the item title".
For more complicated actions, you need to use script. For example, when the user changes the title of the EnhancedLitCrit form (referred to in script as the Item Title field), it needs to be copied into the Title field (the Subject field, in the script) in the Critique area of the form. See Tasks Performed by EnhancedLitCrit.