You need to sign in to do that
Don't have an account?
Ravindar Admin
How to appear a field based on the two different field values?
I have 3 fields on visualforce page of custom object,
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
1) gender__c:Male/female(picklist field) 2) age__c: (number field) 3) field3__c:(picklist field)
The field3__c only display, If the gender__c=female & age__c>12.
Apex Controller Extension
Visualforce
Sorry for the late response, I hope this works.
All Answers
Please check with below link from stack exchange community with suggested solution.
- https://salesforce.stackexchange.com/questions/177741/how-to-appear-a-field-based-on-the-two-different-field-values
Mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.Thanks,
Nagendra
You can implement this on the client side using jQuery. In the jQuery, create a function to collect the Gender and Age values entered by the User. Then check if the Gender is Female and Age is greater than 12. If yes, then show the Field3 input field using show method of jQuery else Hide it. And then call this method in the onchange of the Gender and Age input fields.
Here is the markup -
https://developer.salesforce.com/forums/ForumsMain?id=9060G000000Ua6zQAC
Apex Controller Extension
Visualforce
Sorry for the late response, I hope this works.