Copy link to clipboard
Copied
I have five checkmark boxes (1,2,3,4,5) and when any of the boxes are checked, I need that value of the checkbox to be added to a text box. Is there a script that can do this and separate the values with a comma?
No, I missed one critical bit in that script. Add this to the end
event.value = cValue;
And you'll need to change the export value to the text you want added in the text box.
Copy link to clipboard
Copied
Yes, Use a calculation script on the text box. Like this:
var cValue = "";
if(this.getField("Check1").value != "Off")
cValue += this.getField("Check1").value + ",";
if(this.getField("Check2").value != "Off")
cValue += this.getField("Check2").value + ",";
etc.
Copy link to clipboard
Copied
I tried this in the 'custom calculation script' with the checkboxes named 'Check1', 'Check2', but it didn't enter the values into the text box.
The export value for the checkboxes is 'Yes'. Would this have anything to do with it not working?
Copy link to clipboard
Copied
No, I missed one critical bit in that script. Add this to the end
event.value = cValue;
And you'll need to change the export value to the text you want added in the text box.
Copy link to clipboard
Copied
AWESOME! It worked! Thanks for your help!