To recreate:
Use example 3 (The Form That Builds Itself) from http://drupal.org/node/101707, but make the title field required.
Submit the form with an empty title field.

Expected result:
my_form is called twice, more questions fields added, regardless of invalid form values.

Actual result:
my_form is called only once.

This could be remedied in various ways:

  • A function like form_unset_error that can be called from inside validation functions and that removes element errors
  • Having the whole form as a paramater for the validation function like in Drupal 6
  • ???

Comments

flk’s picture

Status: Active » Closed (fixed)