1

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 ?

1

1 Answer 1

2

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .