Allow editing of "Your email address" text description on "Submit a request"

Beantwortet

9 Kommentare

  • Vladan Jovic
    Aktionen für Kommentare Permalink

    Hi Stephen, you are right, there is no native option to edit this label.
    But you can edit this text with little JS code. 

    • go to https://YOUR_ZD_SUBDOMAIN.zendesk.com/hc/admin/appearance#editor
    • on the left drop-down choose New request page
    • paste this code on the very bottom

    <script>
    $('.form-field.string.required.request_anonymous_requester_email label').text('Your university-provided email address');
    </script>
    • Save
    • Publish

    Hope this helps!

    2
  • DS RF
    Aktionen für Kommentare Permalink

    Hi, how would you do this for the "Attachments" label?

    The URL from your original post is outdated, but I found new_request_page.hbs in the theme editor.

    <script>
    $('.form-field.string.required.request_anonymous_requester_email label').text('your custom email address tag');
    </script>

    That worked for the email address, but I can't figure out the correct attribute to target attachments.  "$('.form-field label').text('my custom attachments text');" works, except that it changes every form label :)

    0
  • Vladan Jovic
    Aktionen für Kommentare Permalink

    Hey hey, this one should do the trick :)

    <script>
    $('label[for="request-attachments"]').text('your custom attachment label');
    </script>

     

     

    0
  • DS RF
    Aktionen für Kommentare Permalink

    Awesome, worked great, thank you!

    1
  • Timo
    Aktionen für Kommentare Permalink

    Does the above code accept dynamic content? If so, how would I go about using that so we can have this localised for all languages? 

    0
  • Danny Koss
    Aktionen für Kommentare Permalink

    Is it possible to re-order the email field (ie push lower down on the page) on the new request page?

    0
  • Vladan Jovic
    Aktionen für Kommentare Permalink

    Hey Timo, Yes, the code I provided will work with a DC item as well. You just need to create a DC item first with all versions and then insert his DC placeholder instead of the text I put there. 

     

    Danny, yes, that is possible but will require some JS coding. If you have a JS dev in your team, it should be pretty straightforward to him. 

    0
  • Kristen
    Aktionen für Kommentare Permalink

    Hello! Thank you in advance for the help!

    1. Do we know if it is possible to regex with the out-of-box "Your email address" field that Zendesk gives with their webform. Ideally, we'd be able to prevent spaces, look for .com or .org, etc to help prevent typos. 

    2. I'm trying to add this script to add a description to the email:

    <script>
    $('.form-field.string.required.request_anonymous_requester_email label').text('TESTING TEXT');
    </script>

    However, this doesn't seem to have any effect and is not showing up at all on the webform. What am I doing wrong?

    0
  • Vladan Jovic
    Aktionen für Kommentare Permalink

    Hey Kristen, I'm not sure would that be necessary at all, cause ZD already has some kind of checking.

    Example: 

     

    In any case, if you want to create something on your own, you can take the code from here: 

    https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript 

    So, on click on the "Submit" button on ZD's form, this function should be called.

    Eg: if email format is not correct, scroll to the email field and show some kind of error text, eg "Your email is not good, please check".

    Hope this helps!

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk