Last active
February 15, 2017 19:48
-
-
Save EliJDonahue/6ba023a665ef750ffdc3a6aace7b8da0 to your computer and use it in GitHub Desktop.
Sample code demonstrating how to disable a list field on an Aras form
This file contains hidden or 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
| // get the form field "container" | |
| var wrapper = getFieldByName("field_name"); | |
| // get the form field element | |
| var l = wrapper.getElementsByTagName("select")[0]; | |
| // disabling/enabling field | |
| if ( some_logic ) { | |
| // disable list | |
| l.disabled = true; | |
| l.readOnly = true; | |
| } else { | |
| // enable list | |
| l.disabled = false; | |
| l.readOnly = false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment