Adding help text to attachments field

5 Commentaires

  • Simon Blouner

    Hey Robert De La O

    You can add some text via. customizing your Help Center theme using some jQuery. An example could look oike this.

    jQuery( document ).ready(function() {
    //Change the subject label text
    jQuery("<div class='extra-upload-info'>It is required to submit a comment when uploading a file.</div>").insertAfter("#upload-dropzone");
    });
    0
  • Robert De La O

    Thanks, Simon Blouner! This worked but created a side effect I didn't think about. 

    It also added the help text to the New Ticket Form which doesn't apply since they have to fill in a lot of other info as well.

    Is there a way to hide it on the ticket form but continue to show it on the requests page?

    0
  • Simon Blouner

    Hey @Robert De La O

    I'm afraid I'm getting confused by the terms you're using. Can you provide us with some screenshots to examplify your challenge? Or a link to your help center maybe.

    I understand it like you have different forms, but only for the one of them, you need to add some extra information for the upload field.

    If this is the case, you can locate the form ID in the url of the form you need to add the text to, and to the following:

    $( document ).ready(function() {
    //Store the ticket form ID
    const ticketForm = location.search.split("ticket_form_id=")[1];

    //Create if statement for each of your forms
    if (ticketForm == FORM_ID_HERE) {
    //Add extra upload field description
    $("<div class='extra-upload-info'>It is required to submit a comment when uploading a file.</div>").insertAfter("#upload-dropzone");
    }
    });

     

    0
  • Robert De La O

    Hi Simon Blouner. Sorry about the confusion.

     

    Looks good on this page which is where you can add a comment to an existing ticket.

    url: ***.com/hc/en-us/requests/143

     

    Ticket form where the help text does not make sense since the form is already showing required fields and none of them are labeled "comment".

    url: ***.com/hc/en-us/requests/new

    0
  • Simon Blouner

    Hey @robert de la o

    Now I get it.

    Then my quick fix would be to check that your URL does not contain the requests/new part, and then fire the script.

    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk