I often use radiobuttons ( \ChoiceMenu[radio,...] ). But there is one aspect I am not happy about: If you select/check a certain button of your group of radiobuttons, then without javascript there is no way to have all radiobuttons of the group again deselected/unchecked.

A little example:

\documentclass{article}
\usepackage[bookmarks=false]{hyperref}
\begin{document}
\begin{Form}
{Do you want to: }%
\end{Form}
\end{document}


I would like to get such a behavior of a group of radiobuttons as in section "Filling Status" in the upper part of this governmental fillable pdf form. If a selected/checked radiobutton once more is checked/selected, then the selection completely vanishes.

Is ist possible to produce such a group of radiobuttons with LaTex and hyperref without javascript? The above linked pdf is made with the software "Adobe LifeCycle Designer".

## Edit: (Peter Grill)

Initially the above produces:

Upon clicking on the first check box, we get:

The goal is to be able to check the first box in this state and revert back to the initial state (first image).

-
Welcome to TeX.SE. It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. This will also serve as a test case and ensure that the solution actually works for you. –  Peter Grill Jun 4 '12 at 0:26
Oh yes, you are right. I changed my post. It now contains an MWE. –  Zdenko Jun 4 '12 at 1:15
Thanks. Can you also elaborate on what you mean by "If a selected/checked radiobutton once more is checked/selected, then the selection completely vanishes". I downloaded the form and using Acrobat 10.1.3 on a Mac I did not see the radio buttons vanishing. –  Peter Grill Jun 4 '12 at 1:28
I do not want the radiobutton to vanish. I want its selection to vanish. If a radiobutton is pressed, I would want to undo it without having to press an other buttton of the radio button group. –  Zdenko Jun 4 '12 at 1:51
If you do a doubleclick at the radio button field "single" in the section "Filling Status" of the linked pdf, zero radio buttons will be pressed. Thats the aimed behavior I would like to reach using LaTex, hyperref and Form. –  Zdenko Jun 4 '12 at 2:06

There's a flag called NoToggleToOff which should control this behavior according to the PDF specification, p. 439:

(Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.

However, this does not work as expected: even if the flag is not set, I wasn't able to deselect a once selected radio button. I tried with different viewers (Adobe Reader X, PDF-XChange Viewer, Foxit Reader [Windows]) and with PDF documents produced by different programs (LaTeX using hyperref, OpenOffice, iText), with no success. Apparently, this feature of the specification isn't implemented in any of the current PDF viewers!

## So how were the radio buttons in the linked form created?

The answer is quite surprising: The "radio buttons" in this PDF don't have the Radio flag set, which technically turns them into simple check boxes. However, as you can see, they still behave like radio buttons, so you can only select one option at a time. You can exploit this oddity by removing this flag in the form fields created by hyperref:

\documentclass{article}
\usepackage[bookmarks=false]{hyperref}

% (http://tex.stackexchange.com/a/74543/3323)
\usepackage{etoolbox}
\makeatletter
\makeatother

\begin{document}
\begin{Form}
{Do you want to: }%
\end{Form}
\end{document}


Like this, you get completely deselectable radio buttons like the ones in the form you provided.

-
\documentclass{article}
\usepackage[bookmarks=false]{hyperref}
\begin{document}
\begin{Form}
{Do you want to: }%