function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
newbiewvfdevnewbiewvfdev 

How to skip required field when you click Previous Button in a Wizard

Hi there,

 

I am building a wizard application. On one of the page, I am asking the user to enter information using inputField tag and I have the required attribute set to true. I also have a 'Previous' Button on the page which will take me to the previous page. How can I ignore the required validation when I click the Previous Button? I only want the validation to occur when there I click next or save. Please help.

Best Answer chosen by Admin (Salesforce Developers) 
newbiewvfdevnewbiewvfdev
ok I figured it out. you could set the immediate attribute to 'true' on the commandButton. And it will skip the validation.

All Answers

newbiewvfdevnewbiewvfdev
ok I figured it out. you could set the immediate attribute to 'true' on the commandButton. And it will skip the validation.
This was selected as the best answer
navaneetha.cm1.3887470963815178E12navaneetha.cm1.3887470963815178E12
It works. But if there is a situation for example I have a inputField and search button in section and input field with required='true' and save button in the next section and user chooses to search then how to pass the value ? If I set immediate to 'true' value will not be passed.