Recent searches


No recent searches

Add description to the Attachments field for "Submit a request" form

Answered


Posted Apr 15, 2016

At the bottom of our "Submit a request" form in our Help Center is an automatic upload form for adding attachments. I would like to add a description similar to the description I've added to my other fields. The problem is, the Attachments field is not accessible in our Ticket Fields Admin Settings so I'm not able to add a description yet I am able to add one to all the other fields (i.e. Subject, etc). Below is an example showing our "Submit a request" form for context.


I looked at the HTML for our Help Center and found there is a template called "New Request Page" with a reference to "{{request_form}}" but I'm not sure how to access that or edit it. 


0

83

83 comments

Hi Jason,

Add the below line in your JS code:-

$('#request-attachments-pool').parent()
.append(‘ADD_YOUR_DESCRIPTION_HERE’);

Replace ADD_YOUR_DESCRIPTION_HERE with your description text.

 

I believe that would work.

Let us know if you have questions.

Team Diziana

 

0


@Diziana,

That worked for me. Thanks! 

Where do I go to learn how to do this kind of think on my own? How did you know what "#request-attachments-pool" is?

0


Where exactly in the js code do you add this? its it 2 lines or 1?

0


@Diziana

 

This no longer seems to be working. I am pasting it at the end of my JS page. 

0


I was able to get this to work for me, but when I add the code to the JS file, it universally adds the description text to every form that we created. I want to add it to one specific form, not all of them.

Could someone help with that?

Thank you!

0


image avatar

Nicole Saunders

Zendesk Community Manager

Hey Larry - 

Welcome to the Zendesk Community! That's a good question. I've asked one of our support agents to weigh in; you should see a response from someone shortly. 

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hey Larry and Jorge, please try this out and let us know the results! Paste it in JS tab, after "$(document).ready(function() {".

$('form#new_request .upload-dropzone').parent().append('<p>Your text here Your text here Your text here Your text here </p>');

1


Hi, can't I use the placeholders of the dynamic text for that?

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hi Vassilios, Yes, you can! Use this code and put it on the very bottom of Submit a request page code.

<script>
$('form#new_request .upload-dropzone').parent().append('<p>{{dc 'here goes DC item title'}}</p>');
</script>

Note that DC item  should be changed from my code above. Please try and let us know how it goes. ;)

2


Hi Vladan, it worked! Thanks a lot!

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Woohoo! Thanks for the feedback, Vassilios!

0


image avatar

Jennifer Rowe

Zendesk Documentation Team

Thanks, Vlad! You're awesome.

0


Hi Vlad,

            How Could I add custom text field as attachment with some blank description placeholder ,because we want to rename that attachment field ,don't want to use the system attachment specific for some form

 

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hey Suman, just to check, which one of these you want to rename?

https://cl.ly/nZX0

 

0


Yes Vlad , I am talking about this system attachment field, could we rename it or use other custom fields as attachment with some text field where some decription can be written

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Yup, we can put there another text. Just try to put this code on the bottom of your Submit a ticket page template.

<script>
$('div#upload-dropzone').prev().text('New text');
// change New text
</script>

Let us know the result! ;)

 

2


Hi vlad ,thanks for the reply ,I also want to know how to change the type of request system field name where the form names are showing in a dropdown under a. brand?

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Just to make sure could you please send me a screenshot of that field?

0


this is the screenshot

the Type of henvendelse ----- the system dropdown for showing the form under a specific brand, we need to change the name for the field also

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Here is the code:

<script>
$('.form-field.request_custom_fields_111111 > label').text('new text');
// replace 111111 with your ticket field ID
// replace new text with a new name of the field
</script>

Hope this helps!

1


Hi,

We're looking to use the attachment field as a way for users to send us a copy of their proof of purchase when they submit their ticket using a certain form (a 'hardware fault' form).

We're also using the attachment field on other forms (e.g. a 'technical support' form) so users can provide extra information to us (e.g. screenshots).

In order to make it clear that we'd like customers to attach their proof of purchase using the 'attachment' field in the 'hardware fault' form, we'd like to add a label "Please attach your proof of purchase below".

Is there a way to add this label ONLY for one form, the 'hardware fault' form.

Thanks,

Eddie

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hi Eddie, yes that is possible ;) Try with this code, just paste it on the very bottom of your Submit a request page (New request) template. Don't forget to replace 123456 with the ID of your form.

<script> 
if(window.location.href.indexOf("123456") > -1) {
$('div#upload-dropzone').parent().find('label').text('Please attach your proof of purchase below')
}
// replace 123456 with the 'hardware fault' form ID
</script>

Let us know how it goes ;)
You should get something like this:

 

2


Thanks, Vladan. That's worked perfectly!

0


I have the same question as Vassilios in this thread. I'm looking to use a dynamic content placeholder for the attachment description. Do I need to put any code in the JS tab? I am entering the following on the 'new request page' HTML:

 

<script>
$('form#new_request .upload-dropzone').parent().append('<p>{{dc ' {{dc.attachment_description}}'}}</p>');
</script>

 

And it's returning "Could not find the placeholder for dynamic content named {{dc.attachment_description}}"

0


^ Actually I figured this out, but now I have a different question. Why would the dynamic content be rendering for 4/5 languages selected? We have English, Spanish, French, German, and Portugese enabled. Everything is fine except for this specific placeholder for attachment description - and it works for all languages EXCEPT French. What would cause that?

0


Help!!!

I am trying to use dynamic content for the attachment field description but it does not work. WHY ? :(

My dynamic content is  {{dc.attachment_system_field_description}}

The code I am using in the JS is $('form#new_request .upload-dropzone').parent().append('<p>{{dc 'attachment_system_field_description'}}</p>');

What might be wrong ?

0


image avatar

Jessie Schutz

Zendesk Customer Care

Hey Huong! I'm check to see if one of our Moderators can help you out here. Sit tight!

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hi Huong, from this perspective your code looks fine. Could you please just paste here a text from your DC item please?

0


hi Vladan, 

My text is the following : Please attach as much screenshots / printscreens as possible to illustrate the issue

If I only use that text without the dynamic content, it works perfectly. But when putting it in a dynamic content, it won't work anymore...

Ly

 

0


image avatar

Vlad

The Wise One - 2022Community Moderator

Hmm, please check maybe you have a line break at the end/beginning of your string in the DC item.
Or if you can share your Help center link with us, that would help us for sure. 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post