function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priyanka  8Priyanka 8 

Picklist in Visualforce

I want to make picklist field required in VF page through some other way, as using required="true" is causing trouble with other functions in my page. Please share your ideas!! Thanks in advance

Ramu_SFDCRamu_SFDC
I checked all the resources and did not get any clue as to how we can set a field as required without using 'required' attribute hence I do not think it is possible.
EnreecoEnreeco
No custom controller?
Ramu_SFDCRamu_SFDC
Yeah like @ForceLogic said, you can use Custom controllers with the help of apexpages.addmessage in controller to display errors if some value is not present.

see the below post for idea

http://salesforce.stackexchange.com/questions/23825/custom-validation-message-on-visualforce-page

http://www.infallibletechie.com/2012/10/how-to-display-error-messages-in.html