+ Start a Discussion

Enable fields based on Picklist value

Hi ,


I have requirement which is as follows....


A form which has 2 picklists and many more fields like text fields , lookups etc , picklist B values will be populated based on Picklist A values (a query runs in the controller to populate picklist B values).. now , as per the requirement I want all the fields to be disabled until a values in Picklist A has been selected...


<apex:actionFunction name="update" action="{!populateItems}" rerender="Panel">
    <apex:param name="Status" value="" />
      <apex:outputLabel for="pick1">CMR ID:</apex:outputLabel>
   <apex:selectList value="{!status}" multiselect="false" size="1" id="pick1" onchange="update(this.value)">
   <apex:selectOptions value="{!items}" />


Since am already using onchange to populate the picklist , how can I achieve the above mentioned requirement.


Please help me.







picklists are standard or custom picklists..i.e you bind that field with input field or created a select list?


I am using custom Picklist.. i.e the <apex:selectOption>


Did you achive this? how?