I am using the solspace freeform module, and am having issues getting the select field to be a required field. My input fields work fine, if I click submit without filling them out then the error will tell which field needs to be filled out. But on my select field, I have made it a required field, and if I hit submit without making a selection the form goes through without it recognizing it was a required field. Here is the code I used for the select field:
{exp:freeform:form form_name="" return="" notify="" template="" required="person_type"}
<select name=”person_type[]” > <option value=”null”>Choose your type</option> <option value=”student”>Student</option> <option value=”parent”>Parent</option> <option value=”counselor”>Counselor</option> <option value=”advisor”>Advisor</option> <option value=”mentor”>Mentor</option> <option value=”educator”>Educator</option> </select>
Freeform module control panel:
Field Name: person_type Field Type: Text input
hey, I was having this same issue. My <select> fields were being ignored in the validation built into freeform. When you remove the “[]” the field doesn’t validate at all.
Does anyone know of a way to validate <select> fields with the freeform module. I’m guessing it isn’t possible within freeform which means I have to look into some other form of validation. Any suggestions?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.