If you need to be sure that clients fill in certain fields, it's best to make those fields 'required'.
To make a field 'required', simply click the 'pencil' icon next to its label.
A modal will appear with different field options, of which 'Required' is the second you can select.
Switch 'Required' to 'on'. You will now see the required-specific options appear.
- Always: The field will always be required, no matter the state or condition.
- Category field: When selected, you have to specify an option from a category field in the form. Hence, a category field needs to be present in the form for this option to be enabled. The field will then only be required when this specific option from the category field is selected.
E.g. Only when you select the option 'Receive email' from the 'Notifications' category field, would the 'Email' field be required.
- Not required when: When selected, you have to specify a different, second field that is present in the form. The first field will then only be required when this second field is not filled in.
E.g. Only when 'Cellphone' is left blank, the 'Home Phone' is required.
- Eval: When selected, this option allows you to enter a pure Ruby code statement. This statement should return true or false. When it returns true, the field will be required. You can use the 'record' keyword to access data from the form.
E.g. When a client enters his or her age and it evaluates to being underage, the 'Parental Agreement' field could be required.
It's best to try out different combinations and see what fits your specific needs.
Please sign in to leave a comment.