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

Userfoms - required field and hidden field


Go to End


3 Posts   1175 Views

Avatar
Craftnet

Community Member, 58 Posts

4 December 2011 at 8:25am

Hi,
I made ​​an order form.
At the beginning the customer gives his address and choose whether it is a company or a private person.
If he choose company then display the additional fields that are required, as is the case with the private person.

My problem is that, and here and here are the required fields.
How do validation to check for only the fields that are not hidden?

The idea is that when you fill in all fields for example: as a company is not sending the form because hidden fields also require validation

Sorry for my bad English

Attached Files
Avatar
Willr

Forum Moderator, 5523 Posts

13 December 2011 at 9:46pm

Yes this is a known defect and on the list to fix for 1.0. At the moment you cannot require hidden fields. There is a fix for it on the github profile page (under issues) but this is untested and hasn't make it into the module yet.

Avatar
Craftnet

Community Member, 58 Posts

13 December 2011 at 10:09pm

Thank you for your response.
In that case, wait for the next edition of the improved error