You need to sign in to do that
Don't have an account?
Sindhu Ambarkar
radiobutton
Hi
My requirement is when i click on first radio button 5 fields tto be displayed
when i click on the another radio button other fields to bedisplayed
can Someone help me
public class sectiondisplay
{
public Account acc{get;set;}
public string atop{get;set;}
public boolean ename{get;set;}
public sectiondisplay(Apexpages.standardcontroller controller)
{
atop='company';
acc.search__c=atop;
}
public void m1()
{
ename=true;
}
public List<Selectoption> getvalues()
{
List<Selectoption> optionvalues = new List<selectoption>();
optionvalues.add(new Selectoption('Company', 'company'));
optionvalues.add(new selectoption('talent','talent'));
return optionvalues;
}
}
<apex:page standardcontroller="Account" extensions="sectiondisplay">
<apex:form >
<apex:selectradio value="{!atop}">
<apex:selectoptions value="{!values}"/>
<apex:actionsupport event="onchange" action="{!m1}" rerender="cpblock"/>
</apex:selectradio>
<apex:pageblock id="cpblock">
<apex:pageblocksection title="details">
<apex:inputfield value="{!Account.type}" rendered="{!ename}"/>
</apex:pageblocksection>
</apex:pageblock>
</apex:form>
</apex:page>
Thanks & Regards,
Sindhu Ambarkar.
My requirement is when i click on first radio button 5 fields tto be displayed
when i click on the another radio button other fields to bedisplayed
can Someone help me
public class sectiondisplay
{
public Account acc{get;set;}
public string atop{get;set;}
public boolean ename{get;set;}
public sectiondisplay(Apexpages.standardcontroller controller)
{
atop='company';
acc.search__c=atop;
}
public void m1()
{
ename=true;
}
public List<Selectoption> getvalues()
{
List<Selectoption> optionvalues = new List<selectoption>();
optionvalues.add(new Selectoption('Company', 'company'));
optionvalues.add(new selectoption('talent','talent'));
return optionvalues;
}
}
<apex:page standardcontroller="Account" extensions="sectiondisplay">
<apex:form >
<apex:selectradio value="{!atop}">
<apex:selectoptions value="{!values}"/>
<apex:actionsupport event="onchange" action="{!m1}" rerender="cpblock"/>
</apex:selectradio>
<apex:pageblock id="cpblock">
<apex:pageblocksection title="details">
<apex:inputfield value="{!Account.type}" rendered="{!ename}"/>
</apex:pageblocksection>
</apex:pageblock>
</apex:form>
</apex:page>
Thanks & Regards,
Sindhu Ambarkar.
Do you want to change the Pick list value that appear in Account.type field based on radio button selection, or you want to show some other field instead of Account.type field?
Thanks,
Rajneesh