Skip to content

Instantly share code, notes, and snippets.

@EliJDonahue
Last active February 15, 2017 19:48
Show Gist options
  • Select an option

  • Save EliJDonahue/6ba023a665ef750ffdc3a6aace7b8da0 to your computer and use it in GitHub Desktop.

Select an option

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
// 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