I want to change the form action on form build. I tried with hook_form_alter() setting #action to '/page', but it doesn't work.


There are several triggers that can prevent $form['#action'] from working in an alter hook. See:

How to redirect to a page after submitting a form

For example, there is a no_redirect property:


"If set to TRUE the form will NOT perform a redirect, even if self::$redirect is set."

You can test this with


Not the answer you're looking for? Browse other questions tagged or ask your own question.