You need to sign in to do that
Don't have an account?
Nick Kaldenberg
Changing What input fields are visible and required based on user input.
I have a VF page for new requests for sales support. They choose what kind of request it is from a picklist. New Product, Pricing, Reports, ETC. Each of these have a set of minimum required information for us to complete the request. Can I use an IF statement that will set the visibility and required status of the input object based on the input of that initial picklist value? or is there an easier way to do this? I am fairly new to salesforce and visualforce coming from working with MS Access and sharepoints.
You need to add an apex:actionsupport with you controlling picklist.
You need to put all other controls in a container like apex:outputpanel and have a Id parameter set for this.
In Action support you have to use rerender with id of outputpanel created above
Then you need to use rendered and required attributes with each control and have if condition using VF expression syntax to conditionally require/show controls.
All Answers
You need to add an apex:actionsupport with you controlling picklist.
You need to put all other controls in a container like apex:outputpanel and have a Id parameter set for this.
In Action support you have to use rerender with id of outputpanel created above
Then you need to use rendered and required attributes with each control and have if condition using VF expression syntax to conditionally require/show controls.