You need to sign in to do that
Don't have an account?
Calvin Barr
visualforce word export: add text based on checkbox status
Hi - I want to be able to add a custom block of text based on the status of a checkbox for a document.
I added the following pageblock information in the place in the contract where the I want the text to conditionally appear, but I keep getting an error on the input field. Do I need to add something to controller or header?
Much appreciated
<apex:page standardController="Contract"
-
-
-
<apex:pageBlock id="theBlock">
<apex:inputCheckbox value="{!My_Checkox__c}">
<apex:actionSupport event="onchange" rerender="theBlock"/>
</apex:inputCheckbox>
<apex:inputText value="THE TEXT I WANT TO DISPLAY" rendered="{!(My_Checkox__c == true)}"/>
</apex:pageBlock>
-
-
-
</apex:page>
I added the following pageblock information in the place in the contract where the I want the text to conditionally appear, but I keep getting an error on the input field. Do I need to add something to controller or header?
Much appreciated
<apex:page standardController="Contract"
-
-
-
<apex:pageBlock id="theBlock">
<apex:inputCheckbox value="{!My_Checkox__c}">
<apex:actionSupport event="onchange" rerender="theBlock"/>
</apex:inputCheckbox>
<apex:inputText value="THE TEXT I WANT TO DISPLAY" rendered="{!(My_Checkox__c == true)}"/>
</apex:pageBlock>
-
-
-
</apex:page>
If you just wamt to show the text use outputText instead.
If you need inputText only then you have to use some variable for that.
All Answers
If this solves your issue, please mark it as best answer.
Thanks Pradeep, but I'm still getting error: <apex:inputText> must contain only a formula expression that resolves to a single controller variable or method.
Any thoughts?
If you just wamt to show the text use outputText instead.
If you need inputText only then you have to use some variable for that.