0

How can I get only those picklist values in my visualforce page which corresponds to a particular selected value of its controlling picklist?

I know about using Schema.getDescribe method to get the picklist values of a picklist field , But my requirement is to get only those picklist values which corresponds to the value selected by its controlling picklist field .

I dont wanna show them as picklists,I rather will display the corresponding labels in a form.

How can this be achieved ?

2

Using apex:inputfield in VF pages will handle field dependency automatically.you dont need to handle it explicitly.

  • But I don't wanna show as a picklist,I wanna display all the dependent values in a form . – Shobhit Saxena Aug 5 '16 at 5:02
  • @ShobhitSaxena picklists can go in a form. Did you want the display to be radio select or checkboxes instead? – martin Aug 5 '16 at 5:10
  • Yes exactly ,I wanna show them with checkbox select options. – Shobhit Saxena Aug 5 '16 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.