getDropDown(id).settings.once()
(since PennController 1.5)
Will disable the DropDown element after selection occurs.
Example:
[js highlight=”2″ try=”true”]newText(“I saw Erika talk to Nate.”)
.settings.after( newDropDown(“”).settings.add(“He”,”She”).settings.once() )
.settings.after( newText(“seemed anxious.”) )
.print()[/js]
Prints I saw Erika talk to Nate. ___ seemed nervous onto the page, where ___ is a drop-down list containing the options He and She. The command .settings.once makes the selection of He or She definitive.