Created
March 31, 2022 19:42
-
-
Save bjoerntx/fe172e7088619c12afd9e72ab618fa62 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 dropDown = this.getField('MyDropDown'); | |
var formText = this.getField('MyFormText'); | |
formText.readonly = true; | |
dropDown.setAction('MouseUp', 'validate(dropDown, formText)'); | |
dropDown.setAction('OnBlur', 'validate(dropDown, formText)'); | |
function validate(field, textField) { | |
if (field.value === 'Other') { | |
textField.value = '[ Enter a value here ]'; | |
textField.readonly = false; | |
app.alert('Please enter a value', 1, 0, 'Text Control PDF'); | |
} | |
else { | |
textField.value = ''; | |
textField.readonly = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment