# Is this a hyperref forms bug?

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

\documentclass[10pt,a4paper]{article}

\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:

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).

-

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{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}

-
That was it. I looked at the manual about the use of name option but it just says name of field (defaults to label) in page 22. – hpesoj626 Sep 19 '12 at 3:56
@hpesoj626 The labels of your CheckBoxs are empty. All the labels of your TextFields are ~... – Paul Gaborit Sep 19 '12 at 6:17
@PaulGaborit: Sorry, not understanding. The problem was related to the text fields not having a name defined for them. If you don't specify a name it appears that the name is label based on the OP's comment above. – Peter Grill Sep 19 '12 at 6:21
@PeterGrill You are right: without name, label is use as default value. But in \CheckBox{}, label are empty... – Paul Gaborit Sep 19 '12 at 6:26
@PaulGaborit Yes, I applied the solution to CheckBox{} as well. :) – hpesoj626 Sep 19 '12 at 6:55