XF 2.2 Restrict Contact Us Form

PrettyPixels

Well-known member
Is there a way to prevent logged in members from accessing the "Contact Us" form? Or better yet, include a message directing them to our support forum? I have several members who would rather fill out the contact form repeatedly than go through the correct channels (our support forum) and I'm getting buried in their emails.

Any help is appreciated. :)
 
Solution
You can prevent registered members using that contact form by going to Usergroup permissions > registered members > general permissions > can use contact form > set to no.
1644352286350.webp

You can then give them their own contact link by doing one or both of the following:

- Add a public navigation item called "Contact us", put your support forum as the link, then put $xf.visitor.user_id in the display condition box so only registered members will see this.

- You could edit the footer link in the PAGE_CONTAINER template and create a conditional to make the link open the contact form if they are a guest or send them to your support forum if they are logged in. If you do this option, keep the registered members permission set to yes...
You can prevent registered members using that contact form by going to Usergroup permissions > registered members > general permissions > can use contact form > set to no.
1644352286350.webp

You can then give them their own contact link by doing one or both of the following:

- Add a public navigation item called "Contact us", put your support forum as the link, then put $xf.visitor.user_id in the display condition box so only registered members will see this.

- You could edit the footer link in the PAGE_CONTAINER template and create a conditional to make the link open the contact form if they are a guest or send them to your support forum if they are logged in. If you do this option, keep the registered members permission set to yes for "use contact form".
 
Solution
Top Bottom