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

Respondida

62 Comentarios

  • 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

     

    4
  • 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 S.
    Zendesk Community Team

    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
  • Vladan Jovic
    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>');
    2
  • Vassilios Lourdas

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

    0
  • Vladan Jovic
    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. ;)

    4
  • Vassilios Lourdas

    Hi Vladan, it worked! Thanks a lot!

    0
  • Vladan Jovic
    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
  • Vladan Jovic
    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
  • Vladan Jovic
    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! ;)

     

    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
  • Vladan Jovic
    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
  • Vladan Jovic
    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
  • Edward 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
  • Vladan Jovic
    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:

     

    2
  • Edward Judd

    Thanks, Vladan. That's worked perfectly!

    0
  • Justin

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

    ^ 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
  • Huong-Ly Dang

    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
  • Jessie Schutz
    Zendesk team member

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

    0
  • Vladan Jovic
    Community Moderator

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

    0
  • Huong-Ly Dang

    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
  • Vladan Jovic
    Community 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

Iniciar sesión para dejar un comentario.

Tecnología de Zendesk