Is there a way to add a message above the Registration Form?
I know you can edit the field by going to "Configuration/People/Account Setting/Manage Field", but how about a message above the form?
Thanks
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThe simplest way would probably be to create a block that is only displayed for that page, and position it above the content.
You could do that with hook_form_FORM_ID_alter() in a custom module:
function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id) {
$form['#prefix'] = '<div><p>'. t('Add your message here'). '</p></div>';
}
Read also Customizing and Overriding User Login page, Register, and Password Reset in Drupal 6 and 7 : another way to add your message and whatever you'd like:
Customizing the user login, register, and password reset pages is fairly simple, and uses the following concepts:
- preprocessing to set variables
- registration of functions in the theme registry
- creation of one or more theme templates.
You can also use markup like this
<?php
function first_admin_setting_form($node, &$form_state) {
$form = array();
$form['overview'] = array(
'#markup' => t('Interface for setting for first module'),
'#prefix' => '<h4>',
'#suffix' => '</h4>',
);
?>