To set the value of a form field use setValue().
For example, to set the value of Name_txt to ‘Andrew’:
To get the value of a form field, use getValue().
This will also trigger the onChange event for the field, i.e. any script that is run when the field value changes.