Using custom ticket fields and ticket forms with the Web Widget Follow

Comments

15 comments

  • Avatar
    Mikayla Welborn

    Do you plan to support conditional fields in the web widget? We'd love to enable ticket forms in the web widget but would need to use conditional fields as well--otherwise each form would show a lengthy list of all possible fields. Thanks!

  • Avatar
    Erica Wass

    @mikayla Thanks for writing! Yes, we are looking to explore how we might be able to add support for conditional fields in the Web Widget in the future. I don't have any current timelines for when or if this might be available, but it is something that we would update on this article.

  • Avatar
    Ed Ball

    It looks like the web widget does not support dynamic content for the custom field names. Playing with this in a sandbox setting and we use some dynamic content for field names so it changes in other languages. Does this really not work with the widget or is there something we need to change?

  • Avatar
    Erica Wass

    Hi @ed. That shouldn't be happening so I'm converting your note into a Support ticket. Thanks for letting us know it's appearing this way for you!

  • Avatar
    Will Sanderson

    I've had success customizing the web widget to show only the forms I want for a certain page, but I am also trying to get tags added to the web widget as well.  Whenever I add the "tags:" line, all ticket forms return.  Maybe my code is incorrect, but all attempts have failed.

    How can I achieve this?

    Here's the current code added below the standard widget script:

    <script type="text/javascript">
    window.zESettings = {
       webWidget: {
          contactForm: {
              tags: ['new_tag', 'next_new_tag']
                ticketForms: [
                    { id: ###### },
                    { id: ###### },
                    { id: ###### }
                ]
            }
        }
    };
    </script>

  • Avatar
    Niall Colfer

    Hi Will,

    Almost perfect! Looks like you're just missing a comma to make this valid JSON. You would need to include a comma after the tags array, before the ticketForms array, to separate them properly. So including just the important bits it would be:

    contactForm: {

      tags: [...],

      ticketForms: [...]

    }

    with the all important comma at the end of the second line.

    Hope this helps!

  • Avatar
    Will Sanderson

    Hey Niall,

    Thanks for the response.  Of course, I was missing that comma!  It now works perfectly.  Thanks for the quick help!!

    Will

  • Avatar
    Joana Crisostomo

    I'm on a Professional Plan and I don't have any option in Channel -> Widget to add Custom Ticket Fields to the Contact Form. Where can I activate this?

     

  • Avatar
    Nate Legakis

    I'm also having trouble finding the place to add custom ticket fields in a contact form. 

  • Avatar
    Joana Crisostomo

    @nate

    Have you checked if any of your custom fields are marked as visible to end-users and editable? That was my issue.

  • Avatar
    Nicole Relyea

    Thanks for sharing your solution, Joana! 

    Nate, let us know if that helps you out as well or if you have further questions. 

  • Avatar
    Mario Peralta

    Is it possible to prefill a Customer Custom Field? (ex: customer code or customer country). My customers are already loged in to an intranet, so i would like to capture customer code and counry automatically.

    What would be the approach to do this?

  • Avatar
    Daniel Aron

    Hi Mario, you can pre-fill a custom ticket field but if you are looking to pass in additional user information with zE.identify that is not currently possible. 

  • Avatar
    Stephan

    Hi, is it possible to pass additional information via Widget Form using hidden custom fields?

    We wanted to transfer additional information like Browser version etc. with the message, without presenting this data editable to the customers.

  • Avatar
    Daniel Aron

    Hi Stephan, the browser version and useragent is automatically on the ticket if you look at the events view: https://support.zendesk.com/hc/en-us/articles/203691176-Viewing-all-events-of-a-ticket

Please sign in to leave a comment.

Powered by Zendesk