Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active April 15, 2020 07:39
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 bjoerntx/45ab90c3e8542e5a1e03e15141bc3642 to your computer and use it in GitHub Desktop.
Save bjoerntx/45ab90c3e8542e5a1e03e15141bc3642 to your computer and use it in GitHub Desktop.
function getFormFieldByName(name) {
return new Promise(resolve => {
TXTextControl.formFields.forEach(function(formField) {
formField.getName(function(formFieldName){
if (formFieldName === name)
{
resolve(formField);
}
})
})
});
}
var formField = await getFormFieldByName("Field1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment