Required fields being bypassed when using Checkboxes/Radio buttons
This concerns the custom fields that are created by the admin for custom forms and applies to the newly released 3.0.5.1 and 3.0.5.2 versions only since the Checkbox and Radio button addition didn't exist in previous versions.
The Radio button choice: It seems that the first option in a field list of Radio Buttons is always selected when the user is filling out the form, so if this field was set to Required and the user forgets to change it, well, the default selected option is pushed out to the final published ad without displaying an error since it was already selected (Yes I know, they're supposed to review their ads or they can go back and change it in their dashboard) but I'm talking about being proactive and dummy proof.
Workaround: Choose Drop Down menu instead of Radio Buttons, it seems to not bypass the form validation action given the the default option is" --select-- and if it remains at that state, the form errors out forcing the end user to go up and make a selection.
Checkboxes: any Checkbox based field in the form that is set to Required ends up not being validated and gets bypassed upon validation of the form.
Workaround: revert back to providing multiple options within a Drop-down menu, although it limits the options of the advertiser.
The checkbox issue is worst then the Radio button issue given its completely bypassed when it comes to validating the required fields.
Ad reviewing in the WP admin panel:
One other flaw noticed was when going through the ad approval process, I noticed some fields were not showing up yet when I click on preview the ad, I see those missing fields that the user filled up, they are also pushed when I approve them, so its not a big deal, oddly enough, among those invisible fields were "Description"...One thing I gotta state is that the forms I created are pretty big, composed of 30-40 fields, about 10 of them are Required, so...not sure if this is a
WP limited display issue within the Admin panel or CP not communicating the fields correctly.
While tackling the required fields subject, here's 2 more I found:
http://appthemes.com/forum/showthrea...required+field
http://appthemes.com/forum/showthrea...required+field
http://appthemes.com/forum/showthrea...-Advertiser%29
(For the Advertiser Contact form section within the Right-side bar widget)
Adding a numeric validation and email structure validation is definitely a recommendation for future releases, in my case, I validate the ads before them being posted online, so its less of an issue.
Not sure if this thread might help guide a workaround for the Checkbox required fields issue but its worth a mention just in case it can evolve into a manual fix until the 3.1 release.
http://appthemes.com/forum/showthrea...required+field