Freeform <select> fields ignoring required on form validation
Posted: 03 March 2008 10:48 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  80
Joined  11-12-2007

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

Profile
 
 
Posted: 03 March 2008 11:29 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12433
Joined  04-29-2002

Change your first item to have:

<option value=”“>Choose your type</option>

And see if that works.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 03 March 2008 11:49 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  80
Joined  11-12-2007

That worked along with taking out the “[]” for some reason.  It didn’t show with the [].  Thanks!

Profile
 
 
Posted: 03 September 2008 10:07 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  20
Joined  06-14-2008

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?

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65087 Total Logged-in Users: 42
Total Topics: 82226 Total Anonymous Users: 18
Total Replies: 441924 Total Guests: 216
Total Posts: 524150    
Members ( View Memberlist )