Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Userforms required dropdown


Go to End


1025 Views

Avatar
TC81

Community Member, 11 Posts

17 November 2011 at 7:28am

I am trying to create a userdefined form with some fairly basic validation. There are 3 text boxes and a series of dropdown menus. I need all the fields to be required and have ticked the "required" box in the options for each. The validation works fine for the text boxes but I need to be able to set the option for the drop down so that the form can't be submitted if the first option (which is "Please select") is chosen. Is there anyway to do this? It's pretty basic validation... but I am struggling.