Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Changing checkbox's false export value

New Here ,
Jul 04, 2016 Jul 04, 2016

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.Brochure Form Email.JPG

The Javascript I ended up with is

Javascript for Brochure Order Form.JPG

I really hope someone can help me!  Thanks and sorry I'm confusing!

TOPICS
Acrobat SDK and JavaScript , Windows
607
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 04, 2016 Jul 04, 2016

It's not possible.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 05, 2016 Jul 05, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines