Pre-populate ticket submission form field via query string (Help Center)



  • Justin

    ^ @HelpBetter, that didn't work for me. Do I need to add a rule for a specific form ID?

  • David da Silva Rosa

    ^ @Nicole

    The proposed solution is not useful to me as I'd like to pre-populate other info than user info:

    1. User clicks on a button in our app.
    2. Logs file gets exported to a private server, which returns a unique logs ID.
    3. Contact form gets opened in web browser, the unique logs ID needs to be pre-populated so we know which logs belong to this ticket for our developers.

    If we could do this simply by matching a field ID with the desired content in the URL, that would be much appreciated. From the prior feedback, it seems there is significant demand for this. 


  • Robert

    I would love the ability to use URL variables to bring over client information


    I just want to pre-populate the subject with Client_ID.

  • Grant Schenck

    This is crazy.  Salesforce, NetSuite, Dynamics, etc. ALL support URL query parms for setting form fields.

    Why is this so hard to add/support?

  • 木嶋 諄

    what is the best way to do it?

    every way which has been posted here doesn't works?

  • Jennifer Grill

    Any solution to this? I would like to add a pre-populated subject in the url. 

  • Jesper Grann Laursen

    I also have this feature request - please fix this 6 years old request

  • Nicole S.
    Zendesk Community Team

    Hey Jesper - 

    Just because something is posted doesn't guarantee it will get built, and longevity of a request is not one of the primary data points we use to prioritize developments. 

    I will ping the Guide team to see if this is something that they have considered or may be considering in the near future. If you have additional details about the problems you're trying to solve or the scope of the business impact, those sorts of things are most influential when the teams are taking customer feedback into account. 

  • Ignacio De La Llave Lorenzo

    +1 very useful in multiple scenarios

  • Tim Herby

    Jira has this feature for filing bugs and tickets.

    It's very standard part of how the web works (link to a form and pre-fill information), and your customers have been asking for 5 years.  The lack of response to this ticket, and continued inability to take it seriously is one of the reasons we are looking to leave Zendesk.

  • Greg Sohl

    @TimHerby, they long treated user questions on Sub-Categories the same way. With their latest announcements, I surmise they have been putting most of their resources into developing other products instead of bringing ZenDesk (support platform) forward.

  • Matt Owens

    Hey Team, 

    Wanted to include a use case for this feature as our team would also benefit URL parameters to pre-fill. 

    Use Case: QR Code Scans

    User has an application that includes a QR reader included. User is working on a project with several similar pieces of hardware, and possibly multiple locations. Each piece of equipment has a QR code that holds a pre-filled URL that includes location, equipment type, and the project to which it was loaned. When the user has an issue with a piece of hardware, they scan the code, and complete minimal steps. Submits with values pre-filled. 

    Current Workflow: User would hit a form for equipment, would select the project (if belonging to multiple), equipment type (even types not applicable), and location. Submits with possibly incorrect information. 


    The ability to create URL specific submission forms would allow to give a direct entry based on known factors. 


    Matt Owens

  • Deanna

    Our team would also benefit from pre-filled custom fields. We are using javascript currently but it doesn't work in all situations:

    Javascript is not supported on all browsers (we are having issues with some older Android browsers and the Playstation 4 game browser)

    Zendesk's custom drop-down fields do not seem to be able to be prefilled with javascript on Safari for iOS. Using the val() function will set a value on the drop-down field but it will not update the look of the field. The drop down box will appear empty to the user.

    We've spent a lot of time trying to resolve platform-specific issues due to lack of support for this feature. Please consider adding this feature as we would like to be able to provide consistent support for prefilled fields across all our platforms.

  • Sorcha Millican-Nagle

    This would be fantastic! Javascript is not supported in all browsers for our game and I can see this being applicable for both games and mobile apps.

  • Tim Nguyen

    I would like to insert code to auto populate a certain field upon a New Request, but can I do this if we have a "Team" license? 

  • Matt McLean

    Here's the code I added to our "new_request_page.hbs" to get this functionality:

    (function ($) {
    var aliases = {
    //this section is optional. the integers for your custom
    //fields can be found by going to the edit page for each field

    //'user_friendly_custom_field_name1': 'custom_field_id_(integer1)'
    //'user_friendly_custom_field_name2': 'custom_field_id_(integer2)'
    var parsedQueryString = function () {
    var segments =\+/g, ' ').split('&'),
    parsed = {};
    if (!segments) return parsed;
    for (var i = 0, count = segments.length; i < count; i++) {
    var parts = segments[i].split('='),
    key = parts.shift(),
    value = parts.length ? decodeURIComponent(parts.join('=')) : null;
    parsed[key] = value;
    return parsed;
    $(document).ready(function () {
    var query = parsedQueryString();
    for (var key in query) {
    if (!query.hasOwnProperty(key) || key == 'ticket_form_id') continue;
    var prefix = '#request_',
    value = query[key];
    if (typeof aliases[key] !== 'undefined') {
    key = aliases[key];
    if (key == 'email') {
    prefix += 'anonymous_requester_';
    } else if (/^\d+$/.test(key)) {
    prefix += 'custom_fields_';
    var field = $(prefix + key),
    data = field.attr('data-tagger');
    if (data) {
    data = JSON.parse(data);
    var label = '';
    if (!value) {
    label = data[0].label;
    } else {
    for (var i = 0, count; i < data.length; i++) {
    if (data[i].value == value) {
    label = data[i].label;
    } else {

    All of the above code was lifted from the old pre-populate the new ticket form ? – Zendesk Support comments page which seems to have gotten removed. A version of the above code was originally shared by Ian Beck -- see

    I added the above script to one of my help centers almost 2 years ago (Copenhagen theme) and it has continued to serve me well.
    You can pre-fill the 'description' field by simply using:


    You can pre-fill any custom fields by either using their identifier integer in the URL, or if you use the optional "aliases" section, you can use a friendly human-readable name for each custom id.. for example, we were using it in location-based kiosks to auto-populate the "location" dropdown menu (which corresponds to a tag):

    (Obviously you'd have to change your subdomain, locale, and your ticket form id for it to work. If you are trying to pre-populate dropdown fields, the "tag" that you put in for your custom field needs to be valid.)

    Thanks again to Ian Beck for this code!

  • Matt McLean

    One warning about the code I posted above - as noted on Github, it doesn't work properly on Mobile browsers.

    However, it definitely works on desktop browsers, both Windows and Mac.

  • Tim Nguyen

    Hi Matt,

    would I be able to apply the code if my company's has Team edition of Zendesk?




  • Matt McLean

    Tim Nguyen,

    Unfortunately, I think the "Team" edition of Support only comes with "Lite" Guide, which does not seem to allow custom themes & integrations, for which you would need to have a Professional or higher level Guide plan, according to this page:

    I would just like to echo what Tim Herby said above:
    It's very standard part of how the web works (link to a form and pre-fill information), and your customers have been asking for 5 years.

    It's very disappointing to me that:
    a)custom code is required at all
    b)every customer that wants this feature needs to add the code themselves, and it's unsupported
    c)it doesn't work on mobile
    d)some customers aren't even able to use this custom code workaround, since only certain plans have the ability to customize the help center.


  • Anders Vännman


    Im trying out this excelent code, it works great for text fields. but it seems like im having some kind of issue with fields that are drop down. When i pass an field that are multiselect the field dissapears, for example:

    i include two screenshots, one before adding "&custom_fields_30020956093=val1" to the request string, and one when i had.






  • Matt McLean


    If you are using Ian Beck's code that I pasted above, the easiest way to do this would be to modify the "aliases" section first:

    var aliases = {
    //this section is optional. the integers for your custom
    //fields can be found by going to the edit page for each field
    'rutan': '30020956093'

    Then, in your URL, make sure you use the tag that corresponds to val1 or val2.

    e.g. if your tag is val1_tag, do this:

  • Matt McLean


    It also seems you are using a multi-select dropdown menu.
    That could be part of the problem.
    See if you can get it to work with a "standard" drop-down menu first. The syntax for multi-select fields may be different or may not work at all.

  • Anders Vännman

    Hi, yes that’s right, I’m using multi select; when I’m using this script on regular text or combo box it works just fine.

    So good that we are considering restructuring our workflow a bit; if I can’t find a way for it to work with multiple select boxes.

    I’ve tried to do some digging in chrome but really, I’m to unfamiliar with html/documents all this so I really can’t figure it out. But it seems like how multiple selects are handled are very diffeeent.

  • Andrew Soderberg
    Community Moderator

    Matt wrote: "One warning about the code I posted above - as noted on Github, it doesn't work properly on Mobile browsers."

    I have just found and implemented Matt's re-discovery of Ian Beck's script. It works perfectly for our needs.

    I have tested it with iPhone Safari, and I have had no issues with it, the fields are pre-populated as expected. 

    I am using iOS 12.3.1. Note that I have not yet tested this on an Android device.

  • Matt McLean


    You're right!

    I don't know when it started working on MobileSafari, but I just tested it and it worked.

    It's still true that this is an unsupported hack, YMMV, etc. etc.

  • Harrison Dimon

    Can't stress enough how important this is to so many people for so many reasons. Please prioritize

  • Anders Vännman

    I agree totally!

    For an example

    We are in a process where we want to use a HR-managment system for onboarding, the company that develops that solution are prepared to forward some of the process to our Zendesk with a query string for completion of some IT-specific fields that arent available in the HR-system (and shouldnt be managed there).

    But it cant really be done out of the box... 



  • Mark Allen

    Not sure why this is so hard to implement. Please do it

  • Gonzalo

    I can't believe yo can't pre-populate a form using url params in Zendesk ... 6 years old this request and not sorted yet. Just gives you an idea on how responsive is this product to business demands. Shameful.

  • Dominik Kuhn

    Indeed! It's ridiculous how less Zendesk cares about its customer request.

    Even with JS, we are highly limited in building solutions.

    They should allow end-users to access the ticket fields API. Then we could at least code proper prefill functions.


Please sign in to leave a comment.

Powered by Zendesk