I wondering how it is rebuild if validation fails.

Say you have several inputs. Change them all and submit. A certain rule isnt validated so the form validation fails (with a form_set_error).

What is the process to redisplay the form ?

Im struggling with input/validation erros and from what I've seen, it doesn't rebuild, even if I would use REBUILD=TRUE

  • No process, as long as the same form comes out on the page you've submitted to, Drupal will rebuild it for you
    – Clive
    Feb 4, 2015 at 13:38
  • Rebuilt it for me, meaning it will process the build_form function Ive created to build the original form ?
    – Math666
    Feb 4, 2015 at 13:42
  • You've lost me - what's a build_form function?
    – Clive
    Feb 4, 2015 at 13:44
  • ^^ the 'drupal_get_form' function ... The thing is : Ive added some logs in different places in the drupal_get_form function, and it seems that if validation fails, no log is triggered
    – Math666
    Feb 4, 2015 at 13:46
  • I confirm what Ive just written : using watchdog I can clearly see that only the validate function is processed. No rebuilding.
    – Math666
    Feb 4, 2015 at 13:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.