• Sandra Ortiz
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
I need help displaying the items found within the outputPanel only when my Hours_Type__c field = "Billable"

Any help would be appreciated. I
 
​<apex:page standardController="Work_Order__c">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>
        window.onload = function(){
        $('input[id$="ReopenTrue"]').prop('checked',true);
    };
    </script>
    
  
    
    <apex:form >
        <apex:pageBlock title="Reopen Work Order: {!Work_Order__c.Name}">
            <apex:pageBlockSection title="Reopen Information" columns="2">
                <apex:inputField value="{!Work_Order__c.Reopen_Reason__c}" required="true"/> 
                <apex:pageBlockSectionItem dataStyle="display:none;" >
                    <apex:inputField value="{!Work_Order__c.Trigger_Reopening__c}" id="ReopenTrue"/> 
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>   
   
   <apex:outputPanel id="Outputs">       
     
        <apex:pageBlockSection title="Billing Information" columns="1"> 
        <apex:pageblocksection ><b>Current Work Order is set to "{!Work_Order__c.Hours_Type__c}" with Non-Billable Reason of "{!Work_Order__c.Non_Billable_Reason__c}"</b>
                </apex:pageBlockSection>
          <apex:inputField value="{!Work_Order__c.What_is_Hours_Type_on_the_Reopened_WO__c}" required="false"/>
          <apex:inputField value="{!Work_Order__c.What_is_the_Non_Billable_Reason__c}" required="true"/>
        </apex:pageBlockSection>   
     </apex:outputPanel>      
      
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Reopen Work Order"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>


 
I have the code below and want to display the help text found right under my </style> tag based on what the user choosed as the Type.

Can anyone help how i can accomplish that?
 
<apex:page standardcontroller="Contract_Requests__c">
<apex:messages />
    <apex:sectionheader title="{!$ObjectType.Contract_Requests__c.label} Edit" subtitle="{!IF(ISNULL(Contract_Requests__c.Name), 'New Contract Request',Contract_Requests__c.Name)}"/>
    
    
  <apex:form >
        <apex:pageblock mode="edit" title="{!$ObjectType.Contract_Requests__c.label} Edit">
            <apex:pageblockbuttons >
                <apex:commandbutton value="Save" action="{!Save}"/>
                <apex:commandbutton value="Cancel" action="{!Cancel}"/>
            </apex:pageblockbuttons>
            
          <apex:pageBlockSection title="" showheader="false" columns="1">
            <style type="text/css">
        .divAlert0
        {
            padding:2px;
            margin-left:auto;
            margin-right:auto;
            font-size:22px;
            height: 100%;
            width: 100%;
            text-align: center;
            background-color: #ADD8E6;
            font-family:'Arial';
            
        }
    </style>

<apex:outputPanel id="divtest0" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Work Order'}">Provide any existing contract, associated SOWs, etc. to be reviewed in the Notes field. If no additional information, enter None.</apex:outputPanel>
    
<apex:outputPanel id="divTest1" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Amendment'}">Request Standard Amendment form. Please provide Terms and Conditions changes in the Notes field.</apex:outputPanel>
    
<apex:outputPanel id="divTest2" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Statement of Work'  || Contract_Requests__c.Type__c =='Subscription Schedule'}">Use Standard Templates if available.  If none available, please request it here.</apex:outputPanel>
    
<apex:outputPanel id="divtest3" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Cancellation/Termination Notice'}">Provide Cancellation Noticed received from Customer and specifics that will be important in the Notes field.</apex:outputPanel>

<apex:outputPanel id="divTest4" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='NDA'}">If Customer paper, please provide word version for review and tracking. If New Request, provide Customer with Standard Stericycle NDA</apex:outputPanel>
    
<apex:outputPanel id="divTest5" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='BAA'}">If Customer paper, please provide word version for review and tracking. If New Request, provide Customer with Standard Stericycle BAA </apex:outputPanel> 

<apex:outputPanel id="divTest6" styleClass="divAlert0" layout="block" rendered="{!(Contract_Requests__c.Type__c =='Compliance Documentation' || Contract_Requests__c.Type__c =='Security Assessment') && (Contract_Requests__c.Documentation_Attached__c == 'No')}">Please attach the proper Documentation to this request. If you don't have proper documentation, your request may be rejected and you will need to resubmit.</apex:outputPanel>

<apex:outputPanel id="divTest7" styleClass="divAlert0" layout="block" rendered="{!(Contract_Requests__c.Type__c =='Addendum' || Contract_Requests__c.Type__c =='Amendment' || Contract_Requests__c.Type__c =='Renewal Contract' || Contract_Requests__c.Type__c =='Subscription Schedule') && (Contract_Requests__c.Original_Contract_Attached__c == 'No')}">Please request the Contract from the Contract Administration and resubmit this request.</apex:outputPanel>

<apex:outputPanel id="divtest8" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Cancellation/Termination Notice' && Contract_Requests__c.Documentation_Attached__c == 'No'}">If you don't have proper documentation, your request may be rejected and you will need to resubmit.</apex:outputPanel>

</apex:pageblockSection>

            <!-- **********   [Record Type : Master ]   **********  -->
            <apex:outputpanel >
                <apex:pageblocksection title="Information" showheader="true" columns="2">
                    <apex:outputfield value="{!Contract_Requests__c.Name}"/>
                    <apex:outputfield value="{!Contract_Requests__c.OwnerId}"/>
                    <apex:inputfield value="{!Contract_Requests__c.Type__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Status__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Type_Detail__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Priority__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Notes__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Cancel_Reason__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Documentation_Attached__c}" required="true"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Original_Contract_Attached__c}" required="true"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Customer Info" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Lead__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Account__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Parent_Account__c}" required="false"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Related Records" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Contract__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Location__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Opportunity__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Contact__c}" required="false"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Additional Info" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Renewal_Terms__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Type__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Implmentation_Fee__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Provided__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Pricing__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Provided_Detail__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Responsible_for_Payment__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Services_to_be_Performed__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Other_Addendum__c}" required="false"/>
                </apex:pageblocksection>
            </apex:outputpanel>
        </apex:pageblock>
    </apex:form>
    
</apex:page>

 
I have the code below and want to display the help text found right under my </style> tag based on what the user choosed as the Type.

Can anyone help how i can accomplish that?
 
<apex:page standardcontroller="Contract_Requests__c">
<apex:messages />
    <apex:sectionheader title="{!$ObjectType.Contract_Requests__c.label} Edit" subtitle="{!IF(ISNULL(Contract_Requests__c.Name), 'New Contract Request',Contract_Requests__c.Name)}"/>
    
    
  <apex:form >
        <apex:pageblock mode="edit" title="{!$ObjectType.Contract_Requests__c.label} Edit">
            <apex:pageblockbuttons >
                <apex:commandbutton value="Save" action="{!Save}"/>
                <apex:commandbutton value="Cancel" action="{!Cancel}"/>
            </apex:pageblockbuttons>
            
          <apex:pageBlockSection title="" showheader="false" columns="1">
            <style type="text/css">
        .divAlert0
        {
            padding:2px;
            margin-left:auto;
            margin-right:auto;
            font-size:22px;
            height: 100%;
            width: 100%;
            text-align: center;
            background-color: #ADD8E6;
            font-family:'Arial';
            
        }
    </style>

<apex:outputPanel id="divtest0" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Work Order'}">Provide any existing contract, associated SOWs, etc. to be reviewed in the Notes field. If no additional information, enter None.</apex:outputPanel>
    
<apex:outputPanel id="divTest1" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Amendment'}">Request Standard Amendment form. Please provide Terms and Conditions changes in the Notes field.</apex:outputPanel>
    
<apex:outputPanel id="divTest2" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Statement of Work'  || Contract_Requests__c.Type__c =='Subscription Schedule'}">Use Standard Templates if available.  If none available, please request it here.</apex:outputPanel>
    
<apex:outputPanel id="divtest3" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Cancellation/Termination Notice'}">Provide Cancellation Noticed received from Customer and specifics that will be important in the Notes field.</apex:outputPanel>

<apex:outputPanel id="divTest4" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='NDA'}">If Customer paper, please provide word version for review and tracking. If New Request, provide Customer with Standard Stericycle NDA</apex:outputPanel>
    
<apex:outputPanel id="divTest5" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='BAA'}">If Customer paper, please provide word version for review and tracking. If New Request, provide Customer with Standard Stericycle BAA </apex:outputPanel> 

<apex:outputPanel id="divTest6" styleClass="divAlert0" layout="block" rendered="{!(Contract_Requests__c.Type__c =='Compliance Documentation' || Contract_Requests__c.Type__c =='Security Assessment') && (Contract_Requests__c.Documentation_Attached__c == 'No')}">Please attach the proper Documentation to this request. If you don't have proper documentation, your request may be rejected and you will need to resubmit.</apex:outputPanel>

<apex:outputPanel id="divTest7" styleClass="divAlert0" layout="block" rendered="{!(Contract_Requests__c.Type__c =='Addendum' || Contract_Requests__c.Type__c =='Amendment' || Contract_Requests__c.Type__c =='Renewal Contract' || Contract_Requests__c.Type__c =='Subscription Schedule') && (Contract_Requests__c.Original_Contract_Attached__c == 'No')}">Please request the Contract from the Contract Administration and resubmit this request.</apex:outputPanel>

<apex:outputPanel id="divtest8" styleClass="divAlert0" layout="block" rendered="{!Contract_Requests__c.Type__c =='Cancellation/Termination Notice' && Contract_Requests__c.Documentation_Attached__c == 'No'}">If you don't have proper documentation, your request may be rejected and you will need to resubmit.</apex:outputPanel>

</apex:pageblockSection>

            <!-- **********   [Record Type : Master ]   **********  -->
            <apex:outputpanel >
                <apex:pageblocksection title="Information" showheader="true" columns="2">
                    <apex:outputfield value="{!Contract_Requests__c.Name}"/>
                    <apex:outputfield value="{!Contract_Requests__c.OwnerId}"/>
                    <apex:inputfield value="{!Contract_Requests__c.Type__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Status__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Type_Detail__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Priority__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Notes__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Cancel_Reason__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Documentation_Attached__c}" required="true"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Original_Contract_Attached__c}" required="true"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Customer Info" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Lead__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Account__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Parent_Account__c}" required="false"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Related Records" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Contract__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Location__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Opportunity__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Contact__c}" required="false"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
                <apex:pageblocksection title="Additional Info" showheader="true" columns="2">
                    <apex:inputfield value="{!Contract_Requests__c.Renewal_Terms__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Type__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Implmentation_Fee__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Provided__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Pricing__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Service_Provided_Detail__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Responsible_for_Payment__c}" required="false"/>
                    <apex:inputfield value="{!Contract_Requests__c.Services_to_be_Performed__c}" required="false"/>
                    <apex:pageblocksectionitem />
                    <apex:inputfield value="{!Contract_Requests__c.Other_Addendum__c}" required="false"/>
                </apex:pageblocksection>
            </apex:outputpanel>
        </apex:pageblock>
    </apex:form>
    
</apex:page>