Created
May 21, 2016 01:10
-
-
Save hyperking/602c77b4991f2e94ba145915c2b4563a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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