views:

26

answers:

1

I'm trying to modify value of the submitted field with php (server-side) to be send by mail and written to db:

hook_form_alter(&$form, &$form_state, $form_id)

changing of value looks easy, but nothing happens after I change it. Hook works.

+1  A: 

hook_form_alter only manipulates the form before it gets rendered:

Perform alterations before a form is rendered.

Have a look at this API comment, where someone gives a nice example of how to do something after the form has been submitted. There is also a _submit($form, &$form_state) action (the given post from the link points that out) that you need to trigger. You can do all your needed altering there. A little bit more description can be found in the examples from the API

DrColossos