Skip to content

Instantly share code, notes, and snippets.

@Sarapulov
Created October 11, 2016 12:41
Show Gist options
  • Save Sarapulov/7240f87f3c7e8731d659a4212902caa6 to your computer and use it in GitHub Desktop.
Save Sarapulov/7240f87f3c7e8731d659a4212902caa6 to your computer and use it in GitHub Desktop.
Move Subject & Description fields and copy custom field value into subject
if ( document.location.href.indexOf('/requests/new') > -1 ) {
// move fields
var $att = $('div.form-field').last();
$('.request_subject').insertBefore($att);
$('.request_description').insertBefore($att);
// set subject
var field_val = $('#request_custom_fields_31616405').val();
$('#request_subject').val(field_val).change();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment