[Tex/LaTex] Is this a hyperref forms bug

formshyperref

I tried to create a fillable form for our school using hyperref. Look at the following MWE:

\documentclass[10pt,a4paper]{article}

\usepackage[headheight=2in,headsep=0.1in,left=0.8in,right=0.8in,bottom=0.5in]{geometry} 
\usepackage{xcolor} 
\usepackage{hyperref}

\begin{document}
\begin{Form}
\noindent\textbf{DESCRIPTION OF ACTIVITY}\raisebox{-2pt}{\TextField[width=4.3in]{~}}\\
\textbf{NATURE OF ACTIVITY} \hfil \raisebox{-2pt}{\CheckBox{}} Curricular (course requirement) \hfil \raisebox{-2pt}{\CheckBox{}} Extra-curricular\\
\textbf{OBJECTIVES OF ACTIVTY}\raisebox{-2pt}{\TextField[width=4.48in]{~}}\\
\hspace*{0.57in}\raisebox{-3pt}{\TextField[width=6.01in]{~}}\\
\textbf{VENUE} \hfill \raisebox{-1pt}{\CheckBox{}} Campus Premises\hfill \raisebox{-0.5pt}{\CheckBox{}} Campus Dormitory  \hfil \raisebox{-1pt}{\CheckBox{}} Off-Campus \raisebox{-3pt}{\TextField[width=1.8in]{~}}
\end{Form}

\end{document}

When I opened it with evince it acts okay. But when I open it with Adobe Reader version 9.4.1 I get weird a weird TextField behavior: an entry in one text field is replicated in the other Text Fields as you can see in the figure below:

enter image description here

So I opened it in a newer version Adobe Reader X in Windows 7 and I still get the same weird result. I also tried Foxit PDF also in Windows 7 and still get the buggy result.

So is this buggy behavior a hyperref thing or am I missing something (in my code).

Best Answer

I can reproduce your problem with Acrobat X on the Mac, but once I specify a unique name for each \TextField with the [name=<name>] option, the problem goes away.

I suspect that when you don't provide a name for the field that each field gets the same default name and hence all use the same memory location -- this is just a guess...

Code:

\documentclass[10pt,a4paper]{article}

\usepackage[headheight=2in,headsep=0.1in,left=0.8in,right=0.8in,bottom=0.5in]{geometry} 
\usepackage{xcolor} 
\usepackage{hyperref}

\begin{document}
\begin{Form}
\noindent\textbf{DESCRIPTION OF ACTIVITY}\raisebox{-2pt}{\TextField[width=4.3in,name=Nature]{~}}\\
\textbf{NATURE OF ACTIVITY} \hfil \raisebox{-2pt}{\CheckBox{}} Curricular (course requirement) \hfil \raisebox{-2pt}{\CheckBox{}} Extra-curricular\\
\textbf{OBJECTIVES OF ACTIVTY}\raisebox{-2pt}{\TextField[width=4.48in, name=Objective]{~}}\\
\hspace*{0.57in}\raisebox{-3pt}{\TextField[width=6.01in,name=Venue]{~}}\\
\textbf{VENUE} \hfill \raisebox{-1pt}{\CheckBox{}} Campus Premises\hfill \raisebox{-0.5pt}{\CheckBox{}} Campus Dormitory  \hfil \raisebox{-1pt}{\CheckBox{}} Off-Campus \raisebox{-3pt}{\TextField[width=1.8in, name=Campus]{~}}
\end{Form}

\end{document}