Copy link to clipboard
Copied
I would like to create a form that has checkboxes that when clicked once are an X and when clicked twice are a checkmark. Is this possible or do I need multiple checkboxes, one for x's and one for checkmarks?
Copy link to clipboard
Copied
You can loop through checkbox style on click but not sure how you imagined clicking twice?
You can read here how checkbox style is changed and you can adapt code to use on click in checkbox:
https://community.adobe.com/t5/acrobat/changing-check-box-style-for-entire-document/m-p/12082784
Copy link to clipboard
Copied
Hi Nesa,
Thanks for your response. What I'm hoping is that the client is able to click the box and as you said, loop through two different checkmark options. For example, click once, it's a checkmark. Click again, it's an X. Click again, it's blank. Click again, it's a checkmark, etc. etc.
Does that make sense? Is your proposed solution still accurate for this situation?
Thanks for your help!
Copy link to clipboard
Copied
EDIT: I just saw post by bebarth, I belive he answered your question.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
While the checkbox does loop through the different styles, the value of the checkbox is the same for both cross and check, so it's not a true 3-state check. This technique is also potentially problematic in Reader, since changing the style officially requires form rights. You'll need to use a variation or a different technique if you will need the 3-State value.
Also keep in mind that this type of scripting will only work in a few of the better PDF viewers.
Copy link to clipboard
Copied
You are right, this example was a 3-option and not a 3-state check box. It was an example I did a few years ago for somebody who didn't need export values. But that doesn't mean it is not possible. Attached is an other example with multi-state check boxes. There are several ways to do that in accordance with what we need at the end.
You are right about the JavaScript and pdf viewers too, but if we only have to write for what is understood by all viewers, we won't write very much anymore.