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

Answered

79 Comments

  • Este Rodriguez

    Hello @... or anyone who can help !

    Unfortunately, none of the codes listed on this thread has helped me. It would be helpful to see a screenshot of the HTML code where you are pasting these codes. I would like to just add a description below the Attachments field (see 2nd picture of example I'm trying to produce). The 2nd picture is from the link @... provided. 

    2
  • Andrii Kozychko

    Hey, is this code will work in any way? 

    I've tried to paste that code to change the "Attachment" field in one of my forms, but it does not work:

    <script> 
     if(window.location.href.indexOf("4420689591703") > -1) {
    $('div#upload-dropzone').parent().find('label').text('Please attach your node logs')
     }
    </script>

    Is there any way to make the ticket unsubmittable if the user has not added the attachment? 

    2
  • Vlad
    Community 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. ;)

    1
  • Vlad
    Community 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! ;)

     

    1
  • Amie - SCX

    Hi friends, 

    I've been trying to follow this along but not having much luck. I'm trying to adjust the text which is associated with the email field. Instead of saying "your email address" i want it to say "email address associated with your online account"

     

     

    I'm not having much luck with the code suggestions in the comments on this article. Wondering if anyone out there might know how I can do this at all? 

    Best,

    Amie

    1
  • Vlad
    Community Moderator

    Hey Amie, it should work if you put this code at the end of your "New request page":

    <script>
    $( document ).ready(function() {
    $('.form-field.request_anonymous_requester_email label').text('Whatever whenever');
    });
    </script>

    Do you know how to edit your theme files?

    1
  • Dan Ross
    Community Moderator

    Hey Grant,

     

    You could do this with some conditional code on your new_request page just before the script you have above.

    Try something like this:

    <script>
    var ticketForm = location.search.split('ticket_form_id=')[1];
    if(ticketForm == "YOUR_TICKET_FORMID_HERE") {

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

    You could have a case for each form ID you wanted to cover.

    Hope that helps!

    1
  • Raúl

    Is there a way to change the "Attachment" placeholder text for the dropzone based on the selection in a specific field? We're trying to change the text based on the user selection of one of the dropdown menus in our contact form. We're also using dynamic text, so we'd want to be able to set that up with the dynamic string.

    Based, on what I've read in the comments, the following should work to replace the placeholder with dynamic text, right? But, how do we make it so it is displayed based on a user's selection (similar to a conditional field).

    <script>
    var ticketForm = location.search.split('ticket_form_id=')[1];
    if(ticketForm == "YOUR_TICKET_FORMID_HERE") {

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

     

    If that isn't possible, is there a way to add the line of dynamic text below the dropzone based on the user's selection?

    1
  • Customer Admin

    Hi all, 

    I see this post is 2 years old

    I'm trying to insert a description in default form attachment

    Is there any change ? I Can't see any text appearing in attach description, used all tips in thread but with no luck

     

    Thanks in advance for help

     

    1
  • Marci Abraham

    I am very happy to report that @...'s suggested script worked perfectly for my needs:

     

    <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>

     

    Mine is not for a hardware fault report, but I needed custom text for the attachments field on just ONE form, not all of them. And now I have it. Thanks Vlad!

    1
  • Diziana

    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
  • Jason

    @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
  • Gadi Vered

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

    0
  • Jorge Alvarez

    @Diziana

     

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

    0
  • Larry Diamond

    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
  • 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
  • Vlad
    Community 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>');
    0
  • Vassilios Lourdas

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

    0
  • Vassilios Lourdas

    Hi Vladan, it worked! Thanks a lot!

    0
  • Vlad
    Community Moderator

    Woohoo! Thanks for the feedback, Vassilios!

    0
  • Jennifer Rowe
    Zendesk Documentation Team

    Thanks, Vlad! You're awesome.

    0
  • SUMAN BHATTACHARYA

    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
  • Vlad
    Community Moderator

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

    https://cl.ly/nZX0

     

    0
  • SUMAN BHATTACHARYA

    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
  • SUMAN BHATTACHARYA

    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
  • Vlad
    Community Moderator

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

    0
  • SUMAN BHATTACHARYA

    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
  • Vlad
    Community 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!

    0
  • Eddie Judd

    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
  • Vlad
    Community 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:

     

    0

Please sign in to leave a comment.

Powered by Zendesk