You need to sign in to do that
Don't have an account?

displaying an input field after checking a checkbox on VF page
Hi All,
I have developed VF page where I have used standrad controller as well controller extension.
I have a requirement where upon clicking a checkbox on the VF page, user must be shown with one more input field to enter the value.
Can anyone please suggest how to show an input field on the VF page upon checking the checkbox.
Thanks,
Srilakshmi B
Hi
You can do that in this way
VFpage:
<apex:page standardcontroller="Employee__c" extensions="Sample" >
<apex:form >
<apex:pageBlock id="SampleBlock">
<apex:inputCheckbox id="isEmp" value="{!isChecked}" >
<apex:actionsupport event="onclick" rerender="SampleView" />
</apex:inputCheckbox>
<apex:outputPanel id="SampleView">
<apex:pageBlockSection rendered="{!isChecked}">
<apex:pageblockSectionItem >
Name <apex:inputtext value="{!Employee__c.name}"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks