Auto-fill the Web Widget Contact Form

Have more questions? Submit a request

37 Comments

  • Laura Hippert
    Comment actions Permalink

    Hi Lena - When I'm testing with the Web Widget and auto-filling the name and e-mail (using the instructions in this article) - I am not able to replicate the issue that you are seeing:

    I am opening up a support ticket for you so that we can look into this further! I will reach out from the ticket shortly. 

    Tolga, I'm glad you were able to open up a support ticket - it looks like this was something that our developers were able to resolve.

    0
  • Kristin Z.
    Comment actions Permalink

    Hi,

    in the LEAVE A MESSAGE ContactForm of the web widget, is there a way to pre-select from a custom drop down? we have set a custom field which is a drop down menu, titled "Reason for contacting us" with some options, and we want to pre-select one of the options. I see you can do this with the live chat filter for the chat form, but this is for the contact form. i can prefill fields but cant figure out how to "pre-select" a custom field.

    1
  • Brett - Community Manager
    Comment actions Permalink

    Hi Kristin,

    The API doesn't actually allow for you to pre-populate drop-down fields as mentioned in our documentation here: Widget API. You can only pre-populate one or more text fields.

    However, you can set the default drop-down field within the Support interface by navigating to Admin>Manage>Ticket Fields. You can also set up a trigger to auto-populate this drop-down field after the ticket has been created.

    Let me know if you have any other questions :)

    0
  • Riley
    Comment actions Permalink

    not being able to dynamically prefill is a seriously lacking feature.

     

    You can prefil default values by using the code below BUT with widget only checks for this once ( on load ). If you change the prefilled value after the widget has loaded it will not react.

     

    window.zESettings.webWidget = {
        contactForm: {
            fields: [{ id: 360017746632, prefill: { "*": *custom variable here* } }]
        }
    };

     

    Is there any update to this functionality being introduced it would be extremely valuable 

    0
  • sebastian
    Comment actions Permalink

    I would like to have the name field and email prefilled in the helpdesk contact form if a user is logged in in the helpdesk. How to do this?

    0
  • Thomas Verschoren
    Comment actions Permalink

    Hey,

     

    For the Contact Form this is done automatically (localted at /hc/en-us/requests/new)

     

    For the Widget (the button bottom corner right) you can add the following code to your document_head.hdbs right under the widget code:

    <script type="text/javascript">
    zE(function() {
    zE.identify({
    name: HelpCenter.user.name,
    email: HelpCenter.user.email
    });
    });
    </script>

    I'd also advice on not enabling the widget from the settings in Zendesk, but by copying the code for the widget into the document_head too.

    This allows you to customise the entire experience.

     

     

    0
  • Jacob J Christensen
    Comment actions Permalink

    Hi Sebastian,

    If an end-user is logged in on your Help Center the email field is not visible for them (the field is already known), do you have a custom name field on your request form that you would like to hide for logged in users? 

    0

Please sign in to leave a comment.

Powered by Zendesk