Skip to content

Instantly share code, notes, and snippets.

@dustinrjo
Created April 16, 2014 00:03
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 dustinrjo/0899c94859175ee8626e to your computer and use it in GitHub Desktop.
Save dustinrjo/0899c94859175ee8626e to your computer and use it in GitHub Desktop.
submitForm = ->
formData = jQuery("form", el).serialize()
$http(
method: "POST"
url: "/?gf_page=preview&id=1"
data: formData
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
).success(submitSuccess)
html = $("form#gform_1").clone()
compiled = $compile(html)({})
console.log compiled
el.find(".form-container").append compiled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment