Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

How do I make checkbox, choice and dropdown fields required?

Author: Eileen Wilde Reference Number: AA-00190 Views: 4734 Last Updated: 08/10/2009 11:39 AM 0 Rating/ Voters

The “required” attribute for these elements is set in another way because of their features in the HTML specification. As with other fields, you need to specify them in config.php:

Example:

required_fields = interests (Interests)

Also, you have to create a hidden field with the same name and a blank value:

Example:

<input type="hidden" value="" name="interests">
<input type="checkbox" name="interests" value="Finance News">