Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created March 9, 2015 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skipjac/cc9242432bbb8fc0e006 to your computer and use it in GitHub Desktop.
Save skipjac/cc9242432bbb8fc0e006 to your computer and use it in GitHub Desktop.
Place this in your new request template Zendesk
<script>
$(document).ready(function() {
jQuery.extend({
getQueryParameters : function(str) {
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
}
});
var queryParameters = $.getQueryParameters();
$('#request_custom_fields_24011943').val(queryParameters.test);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment