Skip to content

Instantly share code, notes, and snippets.

Created April 21, 2014 19:31
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 anonymous/11153698 to your computer and use it in GitHub Desktop.
Save anonymous/11153698 to your computer and use it in GitHub Desktop.
SharePoint 2010/2013 jQuery get form fields in default forms
var fields = {};
$('.ms-formbody').each(function() {
var name = $(this).html().match(/FieldInternalName="([A-Za-z0-9]+)"/);
if (name) fields[name[1]] = $(this).find('input');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment