2

I am trying to create scroll box text fields through eforms.

But I can't create the scroll bar field to enter the text in multiple lines the PDF document

MWE:

\documentclass{article}
\usepackage[pdftex]{eforms}

% From DANTE's registration form!
\newcounter{infoLineNum}
\setcounter{infoLineNum}{0}
\newcommand{\infoInput}[2][4in]{%
  \stepcounter{infoLineNum}%
  \makebox[0pt][l]{%
    \kern 4 pt
    \raisebox{.75ex}
      {\textField[\W0\BC{}\BG{}\TU{#2}]{name\theinfoLineNum}{#1}{20bp}}%
  }
    \hrulefill
}

\begin{document}
\
\begin{tabular}{lp{4in}}
   Title                 & \infoInput{Title}\\[6pt]
   First name            & \infoInput{Firstname}\\[6pt]
\end{tabular}

\end{document}

Now i am getting below output:My current output

But I need below required output:

enter image description here

How to create the text fields to be entered multiple lines in the PDF document.

Please advice how to achieve the required output.

1

Package eForms provides 7 commands that permit input by users: \listBox, \comboBox, \pushButton, \checkBox, \radioButton, \textField, and \sigField (see p6 of the eForms manual). eForms does not provide a scrollbox.

Multiple lines of input in each field is enabled by adding \Ff\FfMultiline to the definition of \infoInput.

This permits multiline responses in each form field: enter image description here

The complete code is:

\documentclass{article}
\usepackage[pdftex]{eforms}

% From DANTE's registration form!
\newcounter{infoLineNum}
\setcounter{infoLineNum}{0}
\newcommand{\infoInput}[2][4in]{%
  \stepcounter{infoLineNum}%
  \makebox[0pt][l]{%
    \kern 4 pt
    \raisebox{.75ex}
      {\textField[\Ff\FfMultiline\W0\BC{}\BG{}\TU{#2}]{name\theinfoLineNum}{#1}{20bp}}% <- added \Ff\FfMultiline
  }
    \hrulefill
}

\begin{document}
\
\begin{tabular}{lp{4in}}
   Title                 & \infoInput{Title}\\[6pt]
   First name            & \infoInput{Firstname}\\[6pt]
\end{tabular}

\end{document}
  • 1
    Your solution is working awesome and your comments of eforms is very useful for me. I hearty thank to you – Vetri Aug 27 '16 at 16:13
  • You are welcome. You might also check out \Ff\FfComb which produces a comb - vertical lines within the field to separate each character typed. Best for single line entries. – Ross Aug 27 '16 at 17:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.