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
UK 1UK 1 

How to reset the picklist value to NONE when parent picklist values is changed using actionsupport in visualforce page

Hi Team,

I have 5 Picklist fields, (Eg: A, B,C.D.E) If A value is YES, then I need to display B,C, D,E fields in VF page.

Till now, it is working fine.

If any value is selected in B,C, D,E and user changes his mind to set A value to NO, the values in B,C, D,E still holds, those are not becoming NONE.

Please find the code:
<p/>
                <apex:outputLabel value="#10 {!$ObjectType.Survey__c.A}<br/><span class='noteText'><u>Note:</u> Live video (such as Skype) is considered transmitted data.</span>" styleClass="questionText" escape="false" /> <br/>
                <apex:inputField label="" value="{!survy.A__c}" style="width: 50%;">
                    <apex:actionSupport event="onchange" rerender="SurveyPageBlock" status="Stage" />
                </apex:inputField>


                <apex:outputPanel rendered="{!survy.A__c== 'Yes'}">
                   
                    <p/>
                    <apex:outputLabel value="#10-1 {!$ObjectType.Survey__c.fields.B__c.InlineHelpText}<br/><span class='noteText'><u>Note:</u> If PHI is de-identified by this solution/service, please select a range (do not select PHI is de-identified).</span>" styleClass="questionText requiredInput" escape="false" /> <br/>
                    <apex:inputField label="" value="{!survy.B__c}" />

                  
                    <p/>
                    <apex:outputLabel value="#10-2 {!$ObjectType.Survey__c.fields.C__c.InlineHelpText}" styleClass="questionText requiredInput" escape="false" /> <br/>
                    <apex:inputField label="" value="{!survy.C__c}" />

                   
                    <p/>
                    <apex:outputLabel value="#10-3 {!$ObjectType.Survey__c.fields.D__c.InlineHelpText}<br/><span class='noteText'><u>Note:</u> Fields/factors refers to MRN, Date of Birth, Gender, etc.</span>" escape="false" styleClass="questionText requiredInput" /> <br/>
                    <apex:inputField label="" value="{!survy.D__c}" style="width: 50%" />

                   
                    <p/>
                    <apex:outputLabel value="#10-3-0 {!$ObjectType.Survey__c.fields.E__c.InlineHelpText}" styleClass="redText" escape="false" /> <br/>
                    <apex:inputField label="" value="{!survy.E__c}" style="width:50%;" />

</apex:outputPanel>


How to solve this?? TIA