Skip to content

How to set text when the element is in read-only state

This example demonstrates how to enter/set value in a non-editable/readonly text field from the DOM using Javascript.   

In the solution shown below, you will see that the value in "Family size in persons:" in Federal Poverty Level (FPL) Calculator" pop-u in the HICC application is set using the "storeEval" or "runScript" command.

Solution:

#CommandTargetValue
Set the value of the read-only text field
1storeEvalwindow.document.getElementById("txt_FamilySize").value="2"Var

Tips, Tricks, Gotchas & Best Practices:  

  • As an alternate solution, you can use runScript command to achieve the same. To understand more about how to use runScript, click here.

Feedback and Knowledge Base