How hook_form_alter()
works in Drupal? It will work when the form is just loaded right ? I need to modify the form variables before submission only . Suppose i am modifying some form variables after rendering the form and the submitting it , where i can write the code for this ?
Take an example as I have a form node_form()
, and I am modifying the form variables in node_form_alter()
and processing the submission in node_form_submit()
function . Will node_form_alter
work on pre submission too ? Or is there any workarounds ?