添加描述为“Subm附件字段it a request" form

Answered

82 Comments

  • Trapta Singh
    Community Moderator

    Hi @Huong-Ly Dang,

    Try putting your code at the bottom of the footer.hbs template under

    The same script, but with plain text instead of DC works as expected.

    The DC is valid and outputs fine, when applied elsewhere in the template.

    Any ideas what I messed up? Thanks!

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Hey Jacob, maybe your DC text contains quote symbol? That will break the code.

    In that case instead of eg

    "we're"

    just put

    "we\'re"

    Hope this helps. If not, please provide us with more infos :)

    0
  • Jacob the Moderator
    Community Moderator

    Thanks Vladan!

    There was a quote symbol, but removing it didn't make the DC content appear.

    It appears that my problem was line breaks in the DC, once I formatted the content to remove any line breaks the content appeared.

    0
  • Amie (successcx)

    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
    The Wise One - 2022

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

    Do you know how to edit your theme files?

    1
  • Amie (successcx)

    Thanks@Vladan, that did the trick. Appreciate your help with this one. :)

    0
  • Grant Foster

    Hey team,

    I'm using the original code suggested which works

    However just wondering if it is possible to apply different descriptions on different forms? A generic one for the attachment field doesn't make sense across all of our forms.

    0
  • 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:

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

    Hope that helps!

    1
  • Grant Foster

    Legend thank you Dan. Works perfectly!

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

    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
  • Vlad
    Community Moderator
    The Wise One - 2022

    嘿,安德里亚,你提交票页面或者是可见的tside? If yes, could you send me a link?

    If not, please put your code here so I can check. Thanks!

    0
  • Customer Admin

    Yes is visible,

    form is cutted in some part to make it easier embedding in website, but is visible to anonymous user

    https://kasanova.zendesk.com/hc/it/requests/new

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    hey Andrea, thanks for the link. I just checked but I can't see the code there, is it already added?

    Also, please include jquery in your page, just paste this code into the Document Head.

    src="https://code.jquery.com/jquery-3.5.1.min.js"
    integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
    crossorigin="anonymous">
    0
  • Customer Admin

    YESSSSS !

    Great job Vladan, with your script everything works like a charm, text appears as expected.

    Thank you very much, I am ready to publish, now

    Cheers

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Glad to hear that, Andrea! Cheersss!

    0
  • Raghu Kavi

    Hello Help desk team

    Can someone guide me how to access my JS code to edit my attachment description field ?

    0
  • Grant Foster

    @...I'm not from the Help Desk team but you should be able to edit your JS code from the Theme section (under edit code)

    https://support.zendesk.com/hc/en-us/articles/115015722628-Editing-the-code-for-your-live-Help-Center-theme-Guide-Professional-and-Enterprise-

    0
  • Nicole Saunders
    Zendesk Community Manager

    Thanks for jumping in, Grant!

    0
  • Permanently deleted user

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

    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

Pleasesign into leave a comment.