Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new

Learn more

View all

Sign in to view all badges

How to check/toggle a checkbox in script

Level 1
Level 1

Simple question that I can't seem to find an answer to. I'm building a PDF form using LiveCycle. I have some radio buttons. When I select a particular radio button, I want it to also select/toggle a checkbox, called "checkbox1" for example. I assume that I need to do this in a script. How do I toggle a PDF form checkbox in Javascript?

form1.Body.RadioButton1::click - (javascript, client)

// Toggle form1.Body.checkbox1

2 Replies
Level 6
Level 6

Since your question is about an XFA form, I'm moving this to the LiveCycle Designer forum: LiveCycle Designer

Level 10
Level 10

Hi there, usually checkboxes have the value by default of 0 and 1 as strings : "0" & "1"

Some times checkboxes have different value either because you changed it or it was implemented by another program...

To make sure you want to check a checkbox, the code that will work at any time would be the following

but normally if the value of your checbox is 1 and 0, you can just use this :