Skip to content

idflorin/user_register_form_override

Repository files navigation

Here is README.md file for the user_register_form_override module:


User Register Form Override

Module Version: 1.0
Drupal Compatibility: Drupal 10 | Drupal 11 Package: Custom

Overview

The User Register Form Override module provides a simple way to customize the default help text displayed on the user registration form in Drupal. With this module, site administrators can easily change the text for the email and username fields to improve user experience or communicate important information clearly.

Features

  • Override Email Help Text: Customize the default help message for the email field on the user registration form.
  • Override Username Help Text: Change the default help text for the username field to align with your site's requirements.
  • Admin Configuration Page: Manage text overrides from a dedicated settings page located at /admin/config/people/user_register_form_override.
  • Configure Link on Modules Page: Quick access to the settings page from the /admin/modules page using the "Configure" link.
  • Seamless Integration: The settings link is placed under the "People" section in the Drupal admin menu for easy navigation.

Installation

  1. Download and Place the Module:

    • Place the user_register_form_override directory in your modules/custom directory within your Drupal installation.
  2. Enable the Module:

    • Go to /admin/modules and enable "User Register Form Override".
    • Alternatively, use Drush:
      drush en user_register_form_override
  3. Clear the Cache:

    • After enabling the module, clear the Drupal cache by navigating to /admin/config/development/performance and clicking Clear all caches, or run:
      drush cr

Configuration

  1. Navigate to the Settings Page:

    • Go to /admin/config/people/user_register_form_override.
  2. Customize Help Text:

    • Email Help Text: Modify the text shown for the email field on the registration form.
    • Username Help Text: Adjust the text displayed for the username field.
    • Click Save configuration to apply the changes.
  3. Verify Changes:

    • Visit the /user/register page to ensure the updated text is displayed correctly. Screenshot

Use Cases

  • Custom Security Policies: Enforce specific instructions for usernames or email requirements.
  • Brand Consistency: Align the help text with your website's branding and tone.
  • Enhanced User Guidance: Provide clearer instructions to reduce form submission errors.
  • Legal Compliance: Include necessary disclaimers or information to comply with regulations, such as GDPR.

Permissions

The module includes one custom permission:

  • Administer User Register Form Override settings: Allows users with this permission to access and modify the module's configuration settings.

Troubleshooting

  • Settings Link Not Visible: Ensure your user role has the "Administer User Register Form Override settings" permission.
  • Cache Issues: Always clear caches after enabling or making configuration changes.
  • Menu Link Placement: The settings link is nested under /admin/people. Verify that your YAML configuration is correct if the link does not appear.

Developer Notes

  • Hooks and Alterations: The module uses hook_form_FORM_ID_alter() to override the help text on the user registration form.
  • Extensibility: Developers can extend or modify this module to handle additional form fields or integrate with other modules.

License

This module is open-source and distributed under the GNU General Public License (GPL) version 2 or later.


Enjoy customizing your user registration experience with the User Register Form Override module!


About

Edit Email and Username Help Text from /user/register

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages