You need to sign in to do that
Don't have an account?
Sandra Ortiz
Visualforce Page display banner based on criteria
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?
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>
All Answers
Then, further in the page, where the type is selected, make it an open tag with actionSupport in the middle <apex:inputField><apex:actionSupport event="onchange" reRender="outputs" /></apex:inputField>. This will make the page rerender the outputs section everytime the Type changes.
Added, thos pieces, getting this error: value for <apex:inputField> is not a dynamic binding!
Then on inputfield add the parameter onchange="updateOutputs()"
This should work!
value for <apex:inputField> is not a dynamic binding!