Remove Submit a Request | Community
Skip to main content

Remove Submit a Request

  • January 10, 2017
  • 17 replies
  • 0 views

How do I remove the Submit a Request option from my knowledge base? 

I'm on the Essential plan.

This topic has been closed for replies.

17 replies

  • January 10, 2017

We use the following code to remove the submit a request based on the tags of the Organization and User that's logged in.

This is in the JS page, when in Help Center Edit mode.

// Limit access to Submit Cases and Live Chat to Administrators
if((HelpCenter.user['tags'].indexOf("administrator") > -1 || HelpCenter.user['tags'].indexOf("internal") > -1 || HelpCenter.user['tags'].indexOf("partner") > -1)) {} else {
$('a.submit-a-request').hide();
$('#zenbox_tab').hide();
zE(function() {
zE.hide();
});
}

You may be able to use $('a.submit-a-request').hide(); on it's own to remove it for everyone.

Craig


  • January 11, 2017

Hey Alana!

Adding custom code to your Help Center is the only way to hide the Submit a Request button. The code customization tools are only available on the Team plan or higher, though, so you would need to upgrade your plan to get access to them.


  • June 12, 2017

Hey Craig,

This is what i was looking for, but i was hoping to do it based off the organizations only and not tags. I played with it a little, but to no avail. Javascript is not really in my wheelhouse right now. Is this possible? Seems possible if you can do off a tag, then why not just the org of the user.


Jessica43
  • August 17, 2017

Thanks so much, this was exactly what I needed!  Another related question - I notice the 'Submit a Request' button is still present prior to login so a user that isn't tagged to be able to create can still click on that and then login and it takes them to the submit a request page.  Is it possible to hide the 'Submit a Request' prior to login?


  • August 17, 2017

Hi Jessica, 

We have a private site so all users have to sign in so, unfortunately, I don't know how to achieve what you are looking to do.

Craig


Trapta
  • August 18, 2017

Hi @Jessica Peck,

You can simply hide the submit_a_request component for all users and then once they are logged in, show them submit_a_request component if they have respective tags else they will not be able to see it.

Thanks

Team Diziana


  • September 7, 2017

Does anyone know if there is a way to disallow/remove "Submit a Request" for anonymous users only? Thus, allowing anyone signed in to create a request irrespective of tag, organization, etc?

We want to make some pages of our KB totally "public" ... requiring no Zendesk registration, but I don't want those users to be able to submit a request.

Thank all/anyone in advance for guidance!

-Katie B


Jessica43
  • September 7, 2017

@Katie, we did this via a template edit of the JS and place the below under the $(document).ready(function() {

// Show div html based on role
if (HelpCenter.user.role=="anonymous"){
$('a.submit-a-request').hide();
}

 


Trapta
  • September 8, 2017

Hi @Katie Swick,

As suggested by Jessica Peck, you can use JS to do this or you can simply use Zendesk {{signed_in}} helper to achieve this. Your code will look like -

{{#if signed_in}}
 {{link 'new_request' class='submit-a-request' role='button'}}
{{/if}}

Thanks

Team Diziana


  • January 22, 2018

Hi @Trapta

 

I'm trying to have it so that only logged in users are able to submit a request, I've pasted both the following codes onto JS but neither are working.

 

{{#if signed_in}}
 {{link 'new_request' class='submit-a-request' role='button'}}
{{/if}}

and

// Show div html based on role
if (HelpCenter.user.role=="anonymous"){
$('a.submit-a-request').hide();

Can someone tell me what to do to get this sorted? :)


  • January 23, 2018

Okay I've found the fix! (for anyone who needs to know) - I needed to replace 

{{link ‘new_request’ class=‘submit_a_request’}}

with

{{#if signed_in}}
{{link ‘new_request’}}
{{/if}}

 


Trapta
  • January 23, 2018

Hi @Jo Saunders,

You don't have to replace anything instead, you have to add one code either the Zendesk component which is 

{{#if signed_in}}
 {{link 'new_request' class='submit-a-request' role='button'}}
{{/if}}

either the JS code which is

// Show div html based on role
if (HelpCenter.user.role=="anonymous"){
$('a.submit-a-request').hide();

In both the cases, remove the other one and it will work for you.

Thanks


  • January 23, 2018

Hi @Trapta

I put both those codes in place but not at the same time, neither worked for me. I put this in place:

{{#if signed_in}}
{{link ‘new_request’}}
{{/if}}

and it now works - but thanks!


  • January 29, 2018

Glad you got it working, Jo!


  • March 28, 2018

If you want to remove this completely from the top nav, just edit header.hbs and remove the following line of code:

 

{{link 'new_request' class='submit-a-request'}}


Nicole17
  • March 29, 2018

Thanks for sharing, Thomas. 


Nicole17
  • November 5, 2018

This conversation has been closed for comments by the Zendesk Community Team. If you have a related or new question, please create a new post