Skip to content

Instantly share code, notes, and snippets.

@vaderj
Last active June 12, 2018 15:12
Show Gist options
  • Save vaderj/48ab4ce95239bedd41e9 to your computer and use it in GitHub Desktop.
Save vaderj/48ab4ce95239bedd41e9 to your computer and use it in GitHub Desktop.
jQuery selector for SharePoint form.each TR has two TD's - one with 'ms-formlabel' class and one with 'ms-formbody' class #Javascript #SharePoint
IF IN A MODAL DIALOG
$(".ms-dlgFrame").contents().find('td.ms-formlabel:contains("Hospital")').siblings('.ms-formbody').text().length;
OTHERWISE:
$('td.ms-formlabel:contains("Hospital")').siblings(".ms-formbody").text()
$('input[title="Hospital "]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment