1

I previously asked this question about modifying the default user registration form. The default form is largely fine, I just want to add some text and some links above and below the form (i.e. instructional advice etc).

One of the answers to my previous question suggested creating a module with the hook form_alter. I did this, however, it seemed all that achieved was adding adding new text fields to the form. I don't want to add new text fields, just some additional text/html before and after the form.

Is there any way to do this with form_alter, and if so, could you detail the code I'd need to do this (such that is does not add another user visible field)?

If there's another way to modify the page directly (not just the form) could you detail it? Keep in mind I want this to work with all themes, so when I change themes my changes do not disappear (which is why I was hoping to be able to do it in a module).

1

I use this way to custom my user login page, I think u can also custom form and use same validate/submit function like user_register_form did

$form['#validate'][] = 'user_register_validate';
$form['#submit'][] = 'user_register_submit';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.