These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Populate checkBox value to a textField

hthai
Registered: Sep 23 2009
Posts: 2

Hello,

I'm creating a form in Acrobat Professional 7. I have the following fields:

A checkBox called CB_Year1 with a value of 2008
A checkBox called CB_Year2 with a value of 2007
A checkBox called CB_Year3 with a value of 2006
A checkBox called CB_Year4 with a value of 2005

A textField called Year1
A textField called Year2
A textField called Year3
A textField called Year4

As the years are checked off, it'll populate into the textFields. I've got that part down. However I hardcoded each year to a specific textField. So if a year is unchecked, there might a blank textField in the middle. For example if only 2008 and 2006 are checked off it will currently look like this.

12/31/2008, _________, 12/31/2006, __________

I would like to write a javascript function that would append the years checked off from left to right. So for example:

12/31/2008, 12/31/2006

How do I go about this and if you can provde any examples. Any help is greatly appreciated.

Thanks!

My Product Information:
Acrobat Pro 7.0.3, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You need a custom script that checks if the check-boxes are checked and creates a string based on that.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com