JavaScript Needed - checkbox or button adds text to a field that can be edited
Hello There...
I have a document that I added checkboxes to the team can select to add text to another field. This is the javascript I used on the field the text is populating in:
if(this.getField("RP").valueAsString != "Off")
event.value = "SEE SERVICE WORK ORDER FOR JUSTIFICATION - Service and Repair To:";
else if(this.getField("M").valueAsString != "Off")
event.value = "[AGE] Year Old [SEX] with a history of [DX] requiring Modification to [EQUIPMENT] for mobility.";
else if(this.getField("NRB").valueAsString != "Off")
event.value = "[AGE] Year Old [SEX] with a history of [DX] requiring [EQUIPMENT] for mobility.";
else
event.value = "";
The problem is I need the team to be able to double click on the words with brackets around them to highlight and change them. With this script, as soon as they change the words, the script reverts they sentence back. Any ideas to make this work?
