Suggestion: Adding option in dashboard if a content variable/field is required or not?
Required content variables/fields
ctuxboy changed the title to Required content variables/fields .
- Edited
Yes, that is what i mean.
The problem is, i have a postal code variable , not a textbox, but a simple input, and it's grouped automatticaly in the template settings variables, not in the content variables group, so it is 'easy', forgot adding the postal code value, when the groups are folded.
Hope you understand what i mean.
Maybe is it also possible restrict variables? Example: variable required only numbers?
6 days later
ctuxboy Hi, you can maybe add a simple test if the variable has content and matches only numbers and display an error if that is not the case:
<@ if not @{ var | match ('/\d+/') } @>
Error!
<@ end @>
Completely untested though but I think it can give you an idea how to approach it.
Hope that helps!