hyperref can build fillable PDF forms — text fields, checkboxes, dropdowns, and buttons — that people complete right in a PDF viewer. All fields go inside a Form environment. This page covers the field commands and how to submit the data.
The Form environment
All interactive fields must sit inside \begin{Form} … \end{Form}. The optional [parameters] (key=value) mainly configure a “submit” button’s behavior (such as where the data is sent). Load hyperref first.
\usepackage{hyperref}
...
\begin{Form}
\TextField{お名前}\par
\CheckBox{利用規約に同意する}\par
\ChoiceMenu[combo]{所属}{大学,企業,その他}
\end{Form}The field types
| Command | What it makes |
|---|---|
\TextField{ラベル} | A text input |
\CheckBox{ラベル} | A checkbox |
\ChoiceMenu[...]{ラベル}{選択肢} | A menu or radio group (combo, radio, popdown) |
\PushButton{ラベル} | A push button (often paired with JavaScript) |
\Submit{ラベル} / \Reset | A submit button / a reset button |
Common options
Each field takes options in [...]: name= (the field name, used to retrieve data or in scripts), width=/height=, default= (initial value), bordercolor/backgroundcolor, charsize, and align (0 = left, 1 = center, 2 = right). For \ChoiceMenu, choose the presentation with combo / radio / popdown.
\TextField[name=email, width=5cm, default={例: [email protected]}]{メール}Submitting, and practical notes
A submit button can send the form data according to the Form’s action (a destination URL or email). Forms are filled in a PDF viewer (Acrobat Reader and the like), and JavaScript and rendering support vary by viewer. For advanced behavior (validation, scripting), use insdljs or AcroTeX’s eforms. For broad compatibility, keep forms simple.