I have trying to make a quiz for distant (online) learning students using the CheckBox from hyperref so that they can answer by just clicking the right boxes. What I would really like is to make the CheckBox values mutually exclusive - if one of the four boxes in the MWE is checked and the student checks another box the previously checked box should become unchecked? A similar question has been answered and although I get the idea of using calculate but my lack of any background in JavaScript won't help me tweak it for my specific case. It would be great if you could help me make my example work. Here is my MWE:

\title{Planetary Physics}
\item Which one of the following is not a planet?  \quad \quad (4 points)
\item \CheckBox[bordercolor=0.3 0.3 0.3,backgroundcolor=0.8 0.8 0.9,name=a]{Earth}
\item \CheckBox[bordercolor=0.3 0.3 0.3,backgroundcolor=0.8 0.8 0.9,name=b]{Mars}
\item \CheckBox[bordercolor=0.3 0.3 0.3,backgroundcolor=0.8 0.8 0.9,name=c]{Moon}
\item \CheckBox[bordercolor=0.3 0.3 0.3,backgroundcolor=0.8 0.8 0.9,name=d]{Mercury}



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.