Recent searches


No recent searches

Text line on Ticket Forms?

Answered


Posted Feb 19, 2016

Hi,

We are using ticket forms with conditional fields, and were wanted to be able to add a line of text to specific forms, kind of like a header. Any thoughts on how to accomplish this, or if it is possible? 

For example, instead of Remit (Payment) Address being a check box field, is there a way to just have it show up as text, or hide the check box? 

Thanks! 


2

41

41 comments

image avatar

ModeratorWes

Most Engaged Member of All Time - 2021

@Robin - Hi, is this within the agent screen or is this on the Request Form.

0


@Wes,

This is on the Request Form in the Help Center. 

0


image avatar

ModeratorWes

Most Engaged Member of All Time - 2021

@Robin - Copy the below code on the JS tab right below the $(.document.ready) function.

//Add text before a custom field
$('.request_custom_fields_24303156').before( "<p>Header</p><hr>" );

Replace the 24303156 with the number of your custom field.  You can locate this when viewing the custom field

0


Thank you Wes!! That was exactly what I was looking for. 

0


image avatar

ModeratorWes

Most Engaged Member of All Time - 2021

@Robin - Glad to hear everything work.  Best of luck.

0


Is there any way to have the Text header part of the conditional field?  The field that this "header" is set to be before is part of a conditional field (using Zendesks app), so even when that field is not displayed yet because its requirement has not been selected, the "text field" is still showing.

0


@Wes - Can you help out with this one? Or if you know any kind of a work around?

0


image avatar

ModeratorWes

Most Engaged Member of All Time - 2021

@Kristos - To make sure I can fully test this can you give me a screenshot or exactly what you are trying to accomplish.  Thanks in advance.

0


@wes have the same problem.  Trying to display HR between sections on a submission form.  

The user choses how many items they have an issue with, then conditional fields displays a set of fields for each.  I.e., Choose number 1-10; then Display Fixture 1, Fixture 1 Issue, Fixture 2, Fixture 2 Issue, etc depending on the selection in number of fixtures.  

I'd like an HR between these sections, but ONLY when the fields are shown.  

0


image avatar

ModeratorWes

Most Engaged Member of All Time - 2021

@Brendan - Can you show me a screenshot?

0


Actually, no.... we hadn't built it all yet bc of the complexity.  Just got off the call with the client and we changed direction and are doing one item per ticket now.  

Now have a different question:

A ticket is submitted including fields for Store Name, Phone Number, and Address.  When the requester submits, we will ask if they have another item to submit, and if so we'd like to take them to a new submission but copy over the Store Name, number, and address fields to be prepopulated.  I know we can probably do this with js, but is there a different way to do in Zendesk?  

0


Hey guys,

Is it possible to insert a clickable hyperlink in that text we are adding in the ticket form via:

//Add text before a custom field 
$('.request_custom_fields_24303156').before( "<p>Header</p><hr>" );

Many thanks !

 

0


image avatar

Jessie Schutz

Zendesk Customer Care

Hi Bertrand!

I'm not sure I understand your question...can you go into a little more detail about what you're trying to accomplish here? What do you want the end result to be/look like?

0


image avatar

Trapta Singh

Zendesk LuminaryCommunity Moderator

Hi @Bertrand Bazin,

Yes, you can add a clickable hyperlink in that text. Use the below code and let us know how it goes for you -

$('.request_custom_fields_24303156').before( "<p>Clickable <a href="URL">link</a></p><hr>" );

Replace URL with the URL of your link.

Thanks

0


Fantastic thks guys !!!

0


image avatar

Trapta Singh

Zendesk LuminaryCommunity Moderator

@Bertrand Enjoy!

Thanks

0


Is there a way to make this display based on the form ID instead of a custom field? 

0


Is there a way to use this with dynamic content?  We have text listed before a custom field (thanks Wes) but we also support french and german players so we need this text to be able to display in those languages also based on the user of course.

1


image avatar

Jessie Schutz

Zendesk Customer Care

Hey Ed!

I'm going to check with the Community Moderators to see if this is possible. Sit tight!

0


Is it possible to add conditional text based off which drop-down option a user selects in a custom field? For example, a drop down has three options. Select Option A and be shown a message.

0


I actually have the exact same question as Justin. There are some request categories (living in a dropdown) that we'd like to A) display a text message with no entry field associate with it B) ideally hide the form submission button so that if the user makes that selection, they actually cannot submit a request (for example, we want to direct them to another support page instead).

0


Hey Justin and Kevin,

This is a great question, and while possible, it would require custom coding within your Help Center. I'm going to leave this in the hands of some of our great community moderators in case they have further guidance on the code that would be necessary for this!

0


@Justin or Kevin - did anyone figure out a way to do this? We're interested in something very similar. Thanks!

0


Hey all,

Did anyone figure out a way to show/hide these kinds of headers based on conditional fields? Similar to what Matthew, Kristos and Brendan were attempting earlier.


Currently I have a pretty lengthy form and I am just trying to give it a bit of visual breakup between sections with some horizontal lines/headers, however if I set these to appear before a field using the method Wes suggested (thanks by the way!) and then that field gets hidden, the headers remain which ends up being pretty messy. 

 

Attaching an example screenshot - On the left, there are sections for Emails and Desktops, which will each potentially expand to up to a couple dozen fields. But then on the right you can see that when all those fields are hidden (not relevant), the headers still show which isn't ideal.

 

 

Any tips would be appreciated - I am sure there's a bunch of ways to accomplish this and I'm currently reading up on what other queries I might be able to use here, I am just very inexperienced with html/js and could use all the help I can get.

 

Thanks!

-SP

1


*bump* Also want to use this hint but with conditional fields. 

 

Thanks

0


image avatar

Brett Bowser

Zendesk Community Manager

@Mikaël Janssens as mentioned above, this would require some custom code on your end to set this up. Perhaps you can provide some additional information on the workflow you're trying to set up to give other users a better understanding of what you're trying to accomplish?

Additionally, while I'm not able to assist with custom code from my end, we do have some documentation that may help point you in the right direction: 

Cheers!

0


Hi

 

I really don't know what I need to extra to explain my question about adding text, text lines etc. when using Conditional Fields... I think the questions here are pretty clear. 

The topic started with a question about adding static info that belongs to a custom Ticket Field. That works fine, but in the case of a Conditional Field, that static info is always visible, even if the Conditional Ticket Field is invisible in the form (because the condition was not set). 

We would then expect that Zendesk can offer help to achieve this, which tag or whatever to use. 

 

Thanks

0


Hey all,

 

Just adding an FYI here, but came across the comments in this article which can help to lead to a solution to hide additional text/text lines on forms: https://support.zendesk.com/hc/en-us/articles/115002860148-Disabling-the-subject-and-description-fields-on-the-new-request-form-in-Help-Center-

 

Essentially, if you simply wrap your text/line in an if statement attached to a change function, you can control when it shows, something like this (based on Socorro's examples on that article):

$("#request_custom_fields_yourcustomfieldidhere").change(function() {   // Script will run if this field is changed
if ($("#request_custom_fields_yourcustomfieldidhere").val() == "valueofcustomfield") {
$('.request_custom_fields_xxxxxxxxx').before( "<p>Header</p><hr>" ); // Your text/line etc.
}
});

 

This would mean you may need at add some conditional logic in here, similar to when you set up your conditional fields, but hopefully this helps some people with little javascript experience (like me!) customize their forms a bit more.

2


image avatar

Brett Bowser

Zendesk Community Manager

This is awesome. Thanks for taking the time to share this with everyone Scott!

0


Now the question is how do we do this in the API v2 templating, since it seems all the previous customizations will not work. I made a terrible mistake and deleted my v1 Copenhagen theme and now none of the customizations I was using work...

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post