Copy link to clipboard
Copied
Hi,
I know nothing about javascript but have managed to teach myself enough to get through making some forms at work. I have managed to make the form submit and design an email (there may have been a simpler way, but I just did it any way I could figure out how to). But I have it so in the email, if a checkbox is ticked, it says Elec. But at the moment if it is not checked it has Off written in place. Is there a way to change the false export value (Don't know if I'm even calling it the right thing?)
Please also don't come back with a whole lot of technical terms, as I seriously don't understand any of it sorry to be a pain! - I have also added a photo of what my email looks like. I have filled some of it out to show what I want happening.
The Javascript I ended up with is
I really hope someone can help me! Thanks and sorry I'm confusing!
Copy link to clipboard
Copied
It's not possible.
Copy link to clipboard
Copied
The value of "unchecked" of a checkbox or radiobutton is "Off". This can not be changed.
What can be done in the situation where the return value of the checkbox/radiobutton is included in a string, is changing it on the fly when assembling the string.
We can for that use the replace() method, as in (assuming the return value would be "checked".
app.alert = "I am " + this.getField("myCheckBox").value.replace(/Off/, "unchecked") + "." ;
Hope this can help.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now