Skip to content

Instantly share code, notes, and snippets.

@hyperking
Created May 21, 2016 01:10
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 hyperking/602c77b4991f2e94ba145915c2b4563a to your computer and use it in GitHub Desktop.
Save hyperking/602c77b4991f2e94ba145915c2b4563a to your computer and use it in GitHub Desktop.
var inputs = {};
var poststr = [];
$('input[type="hidden"]').each(function(){
var entryKey = $(this).attr('name');
var entryValue = $(this).parent().find('input[type="text"],textarea').first().val();
if(entryKey.indexOf('entry.') == false){
console.log(entryKey);
inputs[entryKey] = entryValue;
poststr.push(encodeURIComponent(entryKey) + "=" + encodeURIComponent(entryValue));
}
});
poststr.join('&')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment