Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rolandk on
Since I'm using webform, I don't require users to have access to personal contact forms.
How do I disable it and keep it from showing up under the user account settings in D7?
Thanks
Comments
Visit:
Visit: /admin/config/people/accounts and uncheck the box "Enable personal contact form..."
Also, /admin/people/permissions and uncheck the box "Use personal contact form..."
http://www.radarearth.com
Thanks very much. That
Thanks very much. That worked.
Awesome. Glad I could help.
Awesome. Glad I could help.
http://www.radarearth.com
Thanks
Needed this too!
also styled out the option on the edit profile page, and it's all gone!
Tom C Lopez
Doing it the drupal way
Whilst styling the option away is one way of removing it from the user profile page a much cleaner way of achieving the same result is to add the following code to your themes template.php:
This simply unsets the contact section of the form before it gets rendered.
Hope this helps!
I used that, but even after a
I used that, but even after a cache clear it still shows.
It's only a guess, but if you
It's only a guess, but if you are using an administration theme or the overlay module (which uses a different theme), I think this suggestion will not work. One option might be to use a custom module instead, with approximately the same code, and be sure that that module has a weight (in the {system} table) than the contact module.
this is worked for me. this
this is worked for me. this is ultimate solution. thank you.
°_°
Thanks dooglet. Setting the permissions doesn't seem to remove the form form the users' contact edit form, your snippet fixed it.
Thank you
Brilliant. Not many people explain that this method is a performance saver since it is done on the server side and not by the clients browser.
That's what the "Drupal Way" is... its about performance and such not because we're a cult or something. ( ;
Josh Utley, President & CEO
Intrepid Network Inc. | Multimedia Services & Business Solutions
"Our mission is to provide a more personable multimedia service along with the highest quality business solutions."
Thanks, this worked.
Thanks, this worked.
Perfect
Yes, I am not a novice when it comes to Drupal management, and D7.50 isn't respecting the "uncheck" box for "Use users' personal contact forms" permissions.
So yeah, your suggestion was a perfect remedy :)
Thanks!
Did not work
The solution I used was to just hide the form and form settings using CSS.
Main Theme:
Admin Theme
By Default
"Enable personal contact form by default" just makes it so that users don't have this option checked by default. It still allows them to see and select this. Also, in permissions, "Use users' personal contact forms" is not selected for any role. Is there something else also? What about the permission, "Use the site-wide contact form". Does this also have to be unchecked for everyone?
I am also working on using
I am also working on using webform instead of the personal contact form. Could you advise on how to do it?
Disable and control personal contact form module D7
https://www.drupal.org/project/contact_permissions
only the module works for me.
only the module works for me.
thx for the info
Simplfy
Just to update those who were not able to solve this problem with permissions alone, I used the simplify module to remove this section of the edit user form. It solved other problems for me as well.
https://www.drupal.org/project/simplify
Still showing
I am using Page Manager to manage the fields on the user edit forms (user_edit). The field for the Contact form seems to be part of "General Form" when you add form fields with page manager and you have to add the General form because that's the one that gives you the 'save' button.
Under admin/people/permissions I have disabled all possible permissions for:
Administer contact forms and contact form settings
Use the site-wide contact form
Use users' personal contact forms
Under admin/config/people/accounts I have unticked the box
I have cleared the caches several times.
Still the contact forms show up.
Why?
Anyone?
Authentically,
BassPlaya