My new 5.0 module needs to add text and a field to a core form (from user.module). Could someone please point me to some examples of this being done?

The form API docs say that it is possible to alter core forms using a hook, but I have been unable to find any examples or explanation.

Your assistance will be appreciated.

Thanks

David

Comments

You're in need of

You're in need of hook_form_alter,

http://api.drupal.org/api/HEAD/function/hook_form_alter

I don't have any handy examples for adding a field, only a simple redirect:

http://www.ubercart.org/ubercart/uberdev/form_redirect_using_hook_form_a...

You might look into logintoboggan, as it uses hook_form_alter to modify the login form and has been updated for 5.0 already.

----------------------
Drupal by Wombats