You need to sign in to do that
Don't have an account?
![Nidhi Sharma 13 Nidhi Sharma 13](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Input field visible if radio button option is yes
Hi,
I want that output label - "How many sub-projects" and input field be visible only when radio button "yes" is checked, otherwise invisible. How can I do it in VF
Thanks.
Please refer to code
<apex:pageBlockSection title="Project Details"> <apex:panelGrid columns="2"> <apex:outputLabel value="Project Name" for="gprojectName"/> <apex:inputField id="gprojectName" value="{!gproject.name}"/> </apex:panelGrid> </apex:pageBlockSection> <apex:pageBlockSection title="Decision"> <apex:panelGrid columns="2"> <apex:outputLabel value="Does it have sub-project(s)?" for="radiobtn"/> <apex:selectRadio id="radiobtn"> <apex:selectOption id="radiobtn1" itemLabel="No" itemValue="1"></apex:selectOption> <apex:selectOption id="radiobtn2" itemLabel="Yes" itemValue="2"></apex:selectOption> </apex:selectRadio> <apex:outputLabel id="labid" value="How many sub-projects" for="gsubproject"/> <apex:inputField id="gsubproject" value="{!gproject.sub}"/> </apex:panelGrid> </apex:pageBlockSection>