I have a SelectList from which user selects x,y,z recordName from Object 'A' in a pageBlock 'A' for which the an another pageblock 'B' gets rendered showing fields to insert into 'B' object. Out of all the fields in pageBlock B , few are mandatory so I added attribute ,required = true for them. But the problem occurs when user by mistake selects a wrong record in selectList under PageBlock A , and try to select correct value.

While doing that , the method inside controller should get called which Required fields' empty value are restricting.

Now , I can remove that by taking of "REQUIRED = TRUE" attribute from fields and do the validation in controller. But I am looking for a solution at UI side only such that I do not write any validation code inside my controller.

Is there a solution in SFDC only to do this ?

  • have you tried sing javascript?
    – Nick C
    Sep 6, 2016 at 8:02
  • I haven't. Before doing that , I would like to know if it can be done by SFDC , like restricting Required field's effect to some pageBlock or something else. Such that calling controller on SelectList Value Change should not get restricted because of 'Required = true' attribute in pageBlock B .
    – Rajeev
    Sep 6, 2016 at 8:07

1 Answer 1


There is one attribute immediate="true" using that it will skip all required field on page.

Use this to skip validation no need to remove required.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .