By geraud on
Hi,
I am working on a module that connects Drupal to an external Web Service.
When a user registers, I want him to register in the web service and not in Drupal.
I want to override the submit function that is called when the user_register form is submitted.
I tried several things but no one works.
First I tried to change the $form[#base]. It doesn't work because my submit function would be called if and only if the user_register_submit function did not exist (but it exists !!!).
Then I tried to change $form[id] to 'mymodule_user_register' and write a mymodule_user_register_submit function. But it doesn't work (and I don't understand why).
Any idea ?
Regards
Comments
Seems I can do that with
Seems I can do that with $form['#submit']...
how you achieve this
Can you tell me how you able to solve this issue ..i am also in same situation right now.
You can install a custom
You can install a custom submit handler with
form['#submit'], as mentioned above, Documentation is here: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.... (I have this page bookmarked, it is very useful whenever you are manipulating forms.)Alternately, you could implement
hook_user(),$op == 'submit'. You can use that same function to alter the form (and insert your submit handler).