You need to sign in to do that
Don't have an account?
Rahul
Hello Friends, I want to show the phone input field when rating="warm". I think i have written the logic correctly, dont know why its not showing phone field when Rating is Warm. Need your help
<apex:page standardController="Account">
<apex:form id="myform">
<apex:pageBlock >
<apex:pageBlockSection id="theform" columns="1">
<apex:inputField value="{!Account.Rating}">
<apex:actionSupport event="onchange" reRender="myform" />
</apex:inputfield>
<apex:inputField id="myform" value="{!Account.phone}" rendered="{!Account.Rating == 'warm'}" ></apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:form id="myform">
<apex:pageBlock >
<apex:pageBlockSection id="theform" columns="1">
<apex:inputField value="{!Account.Rating}">
<apex:actionSupport event="onchange" reRender="myform" />
</apex:inputfield>
<apex:inputField id="myform" value="{!Account.phone}" rendered="{!Account.Rating == 'warm'}" ></apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Here is the working code, Please let me know
Thanks
Ramesh
All Answers
Greetings to you!
I have checked your code in my org and the issue is related to picklist values. If you use Warm instead of warm (case-sensitive) then it will work. However, picklist values are case insensitive so, currently, this might be the issue from Salesforce side.
Also, don't use the same id for different visualforce tags.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Here is the working code, Please let me know
Thanks
Ramesh