I have a picklist type outputfield on my visualforce page, i want when i select any value from this field some field will hide as per selected value.

<apex:outputField value="{!oFormobject.C_Item_Married__c }" rendered="{!CONTAINS(sApiName, 'G2C_Item_Married__cN')}">
          <apex:inlineEditSupport showOnEdit="saveButton" event="ondblclick"/>
          <apex:actionSupport event="onchange" reRender="personalInfo" />

Thanks in Advance.

1 Answer 1


As you want to allow users to change picklist options that mean your picklist need to be inputField so user can update it. Here is quick example to how how you can do it with actionSupport

<apex:page controller="ActionSupportDemoCtrl">
<apex:pageBlock id="personalInfo">

  <apex:inputField value="{!acc.Type}"/>
  <apex:actionSupport event="onchange" reRender="personalInfo" action="{!doSomething}" status="mystatus">

<apex:actionStatus id="mystatus" startText=" (Working...)" stoptext="Done!"/>  


public class ActionSupportDemoCtrl{
 public Account acc{get;set;}
 public ActionSupportDemoCtrl() {
       acc = [Select ID,Type From Account Limit 1];

 public PageReference doSomething() {
     acc.Type ='New value';
     return null;

Here is official link of action support doc


You must log in to answer this question.

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