In PDF forms, is there any way to change the default star in radio buttons to a solid circle?
[Tex/LaTex] Changing the defaut star in radio buttons in PDF forms
formshyperref
Related Solutions
You need a unique name
for each multiple choice question. Below I've added \theDTLrowi
(based on the highest-level row counter of datatool
- similar to your question counter) to myGroupOfRadiobuttons
:
\documentclass{article}
\begin{filecontents}{stuff.csv}
stuff,things
Question 1, consectetuer adipiscing elit
Question 2, ut laoreet dolore magna aliquam erat volutpat
Question 3, quis nostrud exerci tation ullamcorper
Question 4, dolor in hendrerit in vulputate velit esse molestie consequat
\end{filecontents}
\usepackage{hyperref}
\usepackage{datatool}
\DTLloaddb{stuff}{stuff.csv}
\begin{document}
\begin{Form}
\DTLforeach{stuff}{\STUFF=stuff,\THINGS=things}{%
\STUFF\par\THINGS\par
\ChoiceMenu[radio,radiosymbol=\ding{52},name={myGroupOfRadiobuttons\theDTLrowi}]{}{A} \hfill
\ChoiceMenu[radio,radiosymbol=\ding{52},name={myGroupOfRadiobuttons\theDTLrowi}]{}{B} \hfill
\ChoiceMenu[radio,radiosymbol=\ding{52},name={myGroupOfRadiobuttons\theDTLrowi}]{}{C}
\par\bigskip\hrulefill\par\bigskip
}%
\end{Form}
\end{document}
Redifining the \LayoutChoiceField
seems to confuse things by swapping texts designated to come before/after the button.
I found a simple way to solve two of your problems:
- One way to get a true radio, is to give them the same
name
\documentclass{article}
\usepackage{hyperref}
\usepackage{amsmath}
\begin{document}
\begin{Form}
Box in the left side, \textbf{true} radio\\
Choose only one:\;\;
\ChoiceMenu[radio,radiosymbol=\ding{108}, name=a]{Option 1}{ }\;
\ChoiceMenu[radio,radiosymbol=\ding{108}, name=a]{Option 2}{ }
\end{Form}
\end{document}
- To get text on the left/right of the button, why not type the text before/after the
\ChoiceMenu[..., ...]{...}{ }
command ? Keeping both the braces{ }
blank triggers the radio-button to vanish completely. So, a minimal text inside the first brace should do.
\documentclass{article}
\usepackage{hyperref, color}
\usepackage{amsmath}
\begin{document}
\begin{Form}
Box in the left side, \textbf{true} radio\\
Choose only one:
\ChoiceMenu[radio,radiosymbol=\ding{108}, name=b]{\textcolor{white}{:}}{ } Option 1\quad
\ChoiceMenu[radio,radiosymbol=\ding{108}, name=b]{\textcolor{white}{:}}{ } Option 2\quad
\end{Form}
\end{document}
I admit the latter is a foolish way of doing it, but given the slowly gaining intelligence of the computer, one day it might be easier to communicate our wishes to the machine much more easily. Till then, we may have to satisfy ourselves with such 'foolish' things, if nothing better seems available.
Best Answer
Use the option
radiosymbol=<value>
, where you can choose from the availablepifont
elements (or something different):If you're interested in a reversed selection (placing the check box first, followed by the description), this a way to do it:
For displaying the options on separate lines, just insert a paragraph break
\par
at the end of each line.Here is the
pifont
quick reference guide: