Elsewhere on this site, I've seen people ask how to turn-off radio buttons once they've been clicked. And the usual answer is "You can't, so use Checkboxes instead."
Humm... try the following. It wll work with one, two, or two hundred Radio Buttons in a group, but I'll just do two. Adjust to your needs:
Given two radio buttons named "rad"; the first returns a value of "Yes" and the 2nd returns a value of "No"
In the Mouse Up() event of the 1st "rad" button, put the following:
if (this.getField("rad").OldValue == "Yes") { this.getField("rad").value = "Off"; }
In the Mouse Up() event of the 2nd "rad" button, put:
if (this.getField("rad").OldValue == "No") { this.getField("rad").value = "Off"; }
In the Mouse Down() event of [b]BOTH[/b] buttons, put:
this.getField("rad").OldValue = this.getField("rad").value;
Now, the radio buttons work as usual: select one, the other turns off. But, if you click a button that's currently selected, it turns off, leaving [b]both[/b] buttons [b]off[/b]!
This plays off (no pun intended) the fact that you can create/add any property you want on any object. In this case, we've created a new property named OldValue. Feel free to call it anything you want, like Fred, or something.
Enjoy!
-- Terrill --
"Those who can't, teach. Those who can't teach, manage."
Carl Young
www.pdfconference.com
A certified expert on Adobe Acrobat, Carl Young is an Adobe Acrobat and LiveCycle Designer trainer and consultant based in Phoenix. He is the producer of the [link=http://www.pdfconference.com/]PDF Conference[/link].