Recent searches


No recent searches

Hiding form selector in Guide

Answered


Posted Oct 27, 2021

I have two forms in my Zendesk instance. I want to remove the form selector so the only way to get to each form is if a direct link is sent.

Does anyone know how to do this?


1

6

6 comments

image avatar

Ifra Saqlain

Zendesk LuminaryMost Engaged Community Member - 2022Most Engaged Community Member of The Year - 2021Community Moderator

Hey Jonatha, copy the below code and paste it at the bottom of your style.css file.

.form-field.select.optional {
display:none;
}

 

 

Another way is, if you have two forms then you can hide your one form from the dropdown list-

https://support.zendesk.com/hc/en-us/community/posts/4409217680410-Hiding-a-ticket-form-on-the-submit-a-request-page?page=1#community_comment_4409675092378

 

Thanks

Ifra

 

1


Hi.  I want to block rendering the form selection field on one specific form only.

Example -

I have three ticket forms - A, B, and C.  I have already figured out how to hide form C from the drop-down list, so now the only way to access form C is via a link.  So far so good.  However once form C loads, I would like to block the form selection field from rendering on form C.  So the outcome is, you can only get to form C via a link, and when form C loads, you cannot select a different form.  However forms A and B should continue to render the form selection field.

How can I accomplish this?

0


image avatar

Ifra Saqlain

Zendesk LuminaryMost Engaged Community Member - 2022Most Engaged Community Member of The Year - 2021Community Moderator

Hey Gavin・ギャビン,

 

Add this script code to your script.js file:

if (window.location.href.indexOf("0000000000") > -1) {
  document.querySelector('.form-field.request_ticket_form_id').style.pointerEvents = 'none';
}

 

0000000000 - Your C form ID where you wanna disable dropdown field to not select A and B form.

 

If any confusion let me know :)

Have a good day!

 

1


Ifra Saqlain  - Long time no talk!

Looking at your last code:

if (window.location.href.indexOf("0000000000") > -1) {
  document.querySelector('.form-field.request_ticket_form_id').style.pointerEvents = 'none';
}

 

0000000000 - Your C form ID where you wanna disable dropdown field to not select A and B form.

 

What if you want to disable the form drop down on multiple forms. 

Example:

Your C form won't allow you to select A and B form.

Your B form won't allow you to select A and C form.

Your A form won't allow you to select B and C form. 

 

To accomplish this, would you to the following:

 

if (window.location.href.indexOf("0000000000", “11111111111”) > -1) {
  document.querySelector('.form-field.request_ticket_form_id').style.pointerEvents = 'none';
}

0


Hello, 

 

Is there a way to remove the form from showing on the main screen in the boxes? When we go onto our guide all our forms are boxes on the front page, we just want to remove on box and only give access to submit that form through a link?

0


image avatar

Jahn

Zendesk LuminaryCommunity Moderator

Hi Ifra Saqlain - Also need your suggestion/recommendation with my use case.

1. We have 2 forms (Form A and Form B) in which we hide the other one as per instructions here
2. Now, that hidden ticket form (Form A)  will only be accessible using direct link.
3. Followed the code you mentioned above on this thread to ensure that Form B won't render in Form A which is perfectly working.
4. Issue is with the Help Center “Submit a request” which is the default Ticket Form (Form B) as it keeps on showing as a dropdown even though there's only 1 selection.

Is there any way we can remove the dropdown option for the form given that there's only 1 form available which is the Form B? 

Thanks a lot in advance! 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post