I have a VF page where I am using checkbox fiels, I want to display three other fiels if the checkbox is selected.
How can I go about doing that ?
Thanks !!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
renderedattribute on<apex:inputfield>or<apex:inputtext>. By setting this attribute, you can control whether or not a component appears on a Visualforce Page.Include all fields that may or may not be shown on the Visualforce Page, but set
rendered="{!Object.YourCheckboxField}"on the fields that you want to show/hide based on the checkbox field. Optionally, you can use a Visualforce function likeIForNOT.For example, if you wanted to show or hide the Email field on Contacts based on whether or not the HasOptedOutOfEmail field is true or false, it would look like this.