Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active April 15, 2020 07:46
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/4310f5e3bb33567ee3dfe7114175897b to your computer and use it in GitHub Desktop.
Save bjoerntx/4310f5e3bb33567ee3dfe7114175897b to your computer and use it in GitHub Desktop.
function addTextFormField() {
TXTextControl.formFields.getCanAdd(canAdd => {
if (canAdd) {
TXTextControl.formFields.addTextFormField(0, function(insertedFormField) {
insertedFormField.setName("Field1");
});
} else {
alert("Form field cannot be added at this location.");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment