You need to sign in to do that
Don't have an account?
udayar_jayam
Can a textbox be enabled after a certain value from a picklist is selected.
Hi All,
In Opportunity object Can a textbox be enabled (made visible) after a certain value from a picklist is selected, such as "Other"? This will allow the user to define a reason for this value. If so, how would I accomplish this? Im using PE
Hi,
You cannot make a text field visible after selecting "Other" in the picklist field out of the box.
Workaround is, have the picklist and text field. Have a validation rule mandating the text field when "Other" is selected.
Hope this helps.
Thanks
thanks for reply
If i select "other" then the text must be editiable. If i select web or mail then the textbox must in uneditiable mode.how to write validation rule for this issue
Hey,
Have a vice versa validation rule. ie. If the picklist != 'other' and the text box is filled, throw the validation rule.
If i select "other" then the text must be editiable. If i select web or mail in picklist then the textbox must in uneditiable mode(user cannot write anything in this textbox).how to write validation rule for this issue
AND(ISPICKVAL( sector__c, "other"), ISBLANK(textbox__c))
You would need to write two validation rules:
AND(ISPICKVAL( sector__c, "other"), ISBLANK(textbox__c))
AND(AND(ISPICKVAL( sector__c, "val1"),ISPICKVAL( sector__c, "val2")), NOT(ISBLANK(textbox__c)))
If you are using VF, then you can use 'rendered' attribute on the text box. Something like below
<apex:inputText value ={} rendered = {!sObject.FieldName != 'Other'}
This will make sure that the textbox is rendered only if the value of the picklist is Other
thank u vmanumachu
I have tried this code in my PE but not working.When i tried the same code in DE it is working.i workaround but i can any solution plz look at this code .
I think it's work fine.Please change the code based on our requirement @udayar_jayam
<apex:page standardController="Opportunity">
<apex:form >
<apex:pageMessages id="theMessage"/>
<apex:pageBlock id="thePageBlock">
<apex:pageBlockSection columns="2">
<apex:actionRegion >
<apex:inputfield value="{!Opportunity.Type}" id="Type">
<apex:actionSupport event="onchange" rerender="ProdFamilyModel,theMessage"/>
</apex:inputfield>
</apex:actionRegion>
<apex:inputfield value="{!Opportunity.LeadSource}"/>
</apex:pageBlockSection>
<apex:outputPanel id="ProdFamilyModel">
<apex:pageBlockSection columns="2" id="ProdFamily" rendered="{!IF(Opportunity.Type == 'New Customer', true, false)}">
<apex:inputfield value="{!Opportunity.LeadValue__c}"/>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>