The CWD Hidden Comments module is a module that add the ability to have commenters choose to hide their name when comment fields are set up correctly
Two twig templates are provided and can be overriden in your sites theme. This module assumes you are using saml_sp as your SSO autentication module and have login links related to that module in the templates. If you are not using saml_sp you will need to override these templates.
- comment--cwd.html.twig
- field--comment--cwd.html.twig
Set all comment permissions to only allow authenticated users to create new comments.
In order for this module to work you need to add a field to a comment type that has a machine name of field_hide_name. When creating the field title it "Hide Name". Additionally you should provide a message in the help text similar to the following as admins will be able to see who submitted the comments so it is only anonymous on the front end of Drupal.
"Please note: Your name will not be shown with your comment, but it will be stored in the system and viewable by site administrators."
Install as you would normally install a contributed Drupal module.
None in module see Requirements for details of how to build comments
Current maintainers for Drupal 10/11:
- Bill Juda