How to change fields to not be required before they are validated In Drupal 7, How can I change certain fields to not be required using the form api, depending on which button they click to submit?
It seems the validation is occuring before the validate function.  Where can I change this before it gets there?
I believe the form validate hook triggers after the default validation which would include checking required fields. It might be easier to not mark the fields required by default and check in your validate hook if they need to be required and then throw a form error if necessary.