-
1. Re: How do I build a field based on Checkboxes?
GKaiseril Jan 30, 2014 10:35 AM (in response to BSisson)Non-checked check boxes or radio buttons have a value of "Off". You are going to have to access each check box and build a string or an array of the field and its value.
Note JavaScript is case sensitive.
-
2. Re: How do I build a field based on Checkboxes?
BSisson Jan 30, 2014 10:47 AM (in response to GKaiseril)I was going to build upon a script I read by George Johnson (Using Radio Buttons to populate a text field) and a similar one that had field #'s (X.1-X.99) so they could be inside a loop.
If should be easy to do something like
if {getfield(checkbox.loop_position) <> "Off" } then.....
-
3. Re: How do I build a field based on Checkboxes?
GKaiseril Jan 30, 2014 10:55 AM (in response to BSisson)You might want read up on Acrobat JavaScript. Try part of your code in the JavaScript console and observer what happens.
getfield(checkbox.loop_position)
With an open pdf try each of the following lines of code:
typeof getfield
typeof getField
-
4. Re: How do I build a field based on Checkboxes?
BSisson Jan 30, 2014 12:47 PM (in response to GKaiseril)I have been reading, and reading, and playing, and trying...
But it is SO different from back when I was active in this stuff with Pascal and C.
We had to declair everything up front, and there were no automatic sturctures. And events, Wow...
The combine the syntax, brackets, and more, and I am having a hard time learning (very) part time while trying to do my real job.
-
5. Re: How do I build a field based on Checkboxes?
GKaiseril Jan 30, 2014 12:57 PM (in response to BSisson)Now there are objects that have properties and methods, a far cry for assembly, PL/I, or the many variations of basic.
-
6. Re: How do I build a field based on Checkboxes?
BSisson Jan 30, 2014 1:07 PM (in response to GKaiseril)Ok, I wanted to invoke a interactive debug session so I could type in javascript and see what it returned...
I figured I could fill in the form and have the debugger open next to it.... and qwery the form interactively by typing in commands as if they were script actions
Uhm...where is that... I tried in both Acrobat Pro-XI and reader to invode a debug session. Reader doesn't have one and Pro just showed me the console but nothing happned when I typed something into the console. I expected an error message or something.
-
7. Re: How do I build a field based on Checkboxes?
try67 Jan 30, 2014 1:09 PM (in response to BSisson)In Acrobat, after entering your code in the JS console, select it with the
mouse and press Ctrl+Enter.
-
8. Re: How do I build a field based on Checkboxes?
BSisson Jan 30, 2014 1:12 PM (in response to try67)ah-ha !
Found a tutorial on the console....
thanks...this is dangerous! (and fun)
-
9. Re: How do I build a field based on Checkboxes?
BSisson Feb 2, 2014 9:46 AM (in response to BSisson)IT WORKS !
Not only that, it works very well, on all my desired platroms, in Acrobat on a PC, in Reader on a PC, android and Ipad!
Thanks to all who helled and gave ideas !
Now that the "Proof-of-concept" is done, the real work begins...



