HTML <select> required Attribute not working in Visualforce?

740    Asked by Ankesh Kumar in Salesforce , Asked on Apr 14, 2021

I'm trying to implement a form with a required drop-down list on a VF page, as described in this exampleIf you click on the link above and run the sample, it works fine but when I try to implement it on a VF page it does not. In my code below I have two fields of type text and select, the validation runs on the text field if it remains blank but not on the select (if the value is set to the default None).

Please advise

Answered by Caroline Brown

If html required not working then Instead of using :

None
Use the following:

I hope this helps, thanks.



Your Answer

Interviews

Parent Categories