You need to sign in to do that
Don't have an account?
jucuzoglu
Conditional display of fields and block elements
I would like to display a different set of elements from an object depending on picklist value. If this were PHP and I could not use Case statements I might do something like:
If (myPicklistValue=='Value1') { // My webform fields to display if the value is 1 } If (myPicklistValue=='Value2') { // My webform fields to display if the value is 2 } If (myPicklistValue=='Value3') { // My webform fields to display if the value is 3 }
I'd like to do something similar on a Visualforce page. Check the value of the picklist. If its equal to value1 then display a set of page and block elements etc...
You can do this using the rendered attribute available for most components, or you can wrap a set of components in an apex:outputPanel component.
For example:
All Answers
You can do this using the rendered attribute available for most components, or you can wrap a set of components in an apex:outputPanel component.
For example:
You can use Rendered in visualforce components to achieve this :
If condition is true then it will display a component else it won't.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Oops!! Apologies, this is a cross post.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
At least we both said the same thing :)