Skip to content

Instantly share code, notes, and snippets.

@prendo
Created October 4, 2013 11:47
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 prendo/7d3940ba118b9012a7b6 to your computer and use it in GitHub Desktop.
Save prendo/7d3940ba118b9012a7b6 to your computer and use it in GitHub Desktop.
/* Copyright 2013 Zachary Doll */
jQuery(document).ready(function($) {
});
// Get the wanted information from some definitions and return false if they don't exist
var Title = gdn.definition('TG_DiscussionTitle', false);
var Tag = gdn.definition('TG_DiscussionTag', false);
// If the title or tag is missing we don't want to pre-populate
if(!Title || !Tag) {
return;
}
else {
// We want to preset the values
$('#Form_Name').val(Title);
$('#Form_Tags').val(Tag);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment