You need to sign in to do that
Don't have an account?

Rendering a field based on a text field
Hi,
I need to render 2 different fields based on the input in a text field.
I can work out how to diplay fields / sections based on a checkbox but is this doable based on text input?
Here's my page code so far (which doesn't work).
I want to render the account id lookup if the account number begins with '700'
Any help appreciated.
<apex:page standardController="Case"> <apex:form > <apex:sectionHeader title="Case" subtitle="{!Case.CaseNumber}"/> <apex:pageBlock title="Case"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!Save}"/> <apex:commandButton value="Cancel" action="{!Cancel}"/> </apex:pageBlockButtons> <apex:pageBlockSection title="New Section" columns="2"><apex:inputField value="{!Case.Account_Number__c}"/> </apex:pageBlockSection> <apex:pageBlockSection id="theBlock"> <apex:inputfield value="{!case.Account_Number__c}"> <apex:actionSupport event="onchange" rerender="theBlock"/> </apex:inputfield> <apex:inputText value="{!case.accountid}" disabled="false" rendered="{(String)case.account_number__c).substring(0,3) == '700')}"/> <apex:inputText value="{!case.accountid}" disabled="true" rendered="{(String)case.account_number__c).substring(0,3) == '700')}"/>
I think we can do it with the help of jQuery