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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
hook_form_alteronly manipulates the form before it gets 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