+ Start a Discussion
TylerBrooksTylerBrooks 

How do I make my visualforce page only popup if a checkbox is checked?

I have created a Visualforce page on my custom object and it shows up fine, however I only want it to be displayed if a checkbox on the object is checked.

Here is my code
<apex:page standardController="RMA__C">
    <apex:form >
        <apex:pageBlock title="Update RMA" mode="edit">
            <apex:pageBlockSection title="Confirm Field Values" columns="2">
                <apex:outputfield value="{!RMA__c.Contact__c}"/>
                <apex:outputfield value="{!RMA__c.Request_Priority__c}"/>
                <apex:outputfield value="{!RMA__c.Ship_to_Address__c}"/>
                <apex:outputfield value="{!RMA__c.Bill_to_Address__c}"/>
                <apex:outputfield value="{!RMA__c.Shipping_Priority__c}"/>
                <apex:inputField value="{!RMA__c.Changes_have_been_review__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Submit"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
And here is the API name for the Field: RMA__c.RLI_has_QUOTE_SO__c.
Any help would be appreciated.

Thanks in advance,
Tyler
Best Answer chosen by TylerBrooks
Raj VakatiRaj Vakati
Try this
 
<apex:page standardController="RMA__C">
    <apex:form >
	  <apex:outputPanel id="thePanel" rendered="{!RMA__c.RLI_has_QUOTE_SO__c}">
      
        <apex:pageBlock title="Update RMA" mode="edit">
            <apex:pageBlockSection title="Confirm Field Values" columns="2">
                <apex:outputfield value="{!RMA__c.Contact__c}"/>
                <apex:outputfield value="{!RMA__c.Request_Priority__c}"/>
                <apex:outputfield value="{!RMA__c.Ship_to_Address__c}"/>
                <apex:outputfield value="{!RMA__c.Bill_to_Address__c}"/>
                <apex:outputfield value="{!RMA__c.Shipping_Priority__c}"/>
                <apex:inputField value="{!RMA__c.Changes_have_been_review__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Submit"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
		        </apex:outputPanel>

    </apex:form>
</apex:page>