\newboolean{insdljs}
\IfFileExists{insdljs.sty}
{\usepackage[pdftex]{insdljs}
- \setboolean{insdljs}{true}}
+ \setboolean{insdljs}{true}
+ \pdfcatalog{/AA \the\pdflastobj\space 0 R}}
{\setboolean{insdljs}{false}}
-\pdfcatalog{/AA \the\pdflastobj\space 0 R}
-
\ifinsdljs % only execute if package insdljs is installed
\begin{insDLJS}[exaaae]{exaaae}{JavaScript}
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle false
-\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, urlbordercolor={1 0 0}"
+\pdf_quoted_options "pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, urlbordercolor={1 0 0}"
\papersize a4paper
\use_geometry false
\use_package amsmath 1
\begin_inset space ~
\end_inset
-form
+Form
\begin_inset space ~
\end_inset
-parameters
+Parameters
\family default
.
For example in this document the following was inserted to the parameter
\begin_inset Quotes erd
\end_inset
- and the HTML method is
+ and the submit method is
\series bold
post
\series default
\begin_inset space ~
\end_inset
-possible types of fields in a PDF form:
+possible elements in a PDF form:
\end_layout
\begin_layout Subsection
\end_layout
\begin_layout Standard
-You must also specify a field name for text fields: Set the cursor into
- its
+You must also specify a name for text fields: Set the cursor into its
\family sans
Params
\family default
inset.
- There insert for example the parameter
+ There insert the parameter
\series bold
name=customer
\series default
\end_inset
fields as example: Fill one and see that the other one will also be filled
- automatically:
+ automatically when you click outside of the field:
\begin_inset Newline newline
\end_inset
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+ Special characters should be avoided in element names.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\series bold
Note:
\series default
- It is highly recommended to use a uniform layout of all fields in your
- form.
+ It is highly recommended to use a uniform layout of all fields in a form.
See sec.
\begin_inset space \thinspace{}
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:Form-field-customization"
+reference "sec:Form-element-customization"
\end_inset
- for how this is done.
+ how this is done.
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-You must also specify a field name for check boxes: Insert for example the
- parameter
+You must specify also for check boxes a name.
+ Insert e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
+\begin_inset space \space{}
+\end_inset
+
+the parameter
\series bold
name=age
\series default
\begin_layout Description
Combo The choices are listed in a combo box (dropdown list) but the user
- is allowed to choose something that is not in the predefined list.
+ is allowed to input something that is not in the predefined list.
\end_layout
\begin_layout Description
Popdown All choices are listed below each other.
- It the filed is not high enough a scroll bar is automatically added to
+ If the field is not high enough a scroll bar is automatically added to
the field.
\end_layout
\begin_layout Standard
-To determine the choice menu type, add the parameter
+To determine the choice menu type one uses the parameter
\series bold
radio
\series default
\end_layout
\begin_layout Standard
-You must also specify a field name for choice menus: Insert for example
- the parameter
+You must also specify a name for choice menus.
+ Insert for example the parameter
\series bold
name=country
\series default
\series bold
country
\series default
- is the field name) into the
+ is the name) into the
\family sans
Params
\family default
\end_inset
.
- By specifying names you can also preset/propose e.g.
+ With the name you can also preset/propose e.g.
\begin_inset space \space{}
\end_inset
\end_inset
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note:
-\series default
- Due to a bug in the \SpecialChar LaTeX
- package
-\series bold
-hyperref
-\series default
- it is currently only possible the set the first choice as default.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Newpage newpage
-\end_inset
-
-
\end_layout
\begin_layout Subsection
\begin_layout Standard
The action that is triggered by pressing the button is specified by JavaScript
code.
- To specify it, add the parameter
+ To do this, add the parameter
\series bold
onclick={}
\series default
\end_layout
\begin_layout Standard
-A common usage for pus buttons is to open a weblink.
- Such a button is created by inserting a hyperlink into the button inset.
+A common usage for push buttons is to open a weblink.
+ Such a button is created by inserting a hyperlink into the
+\family sans
+PushButton
+\family default
+ inset.
Here is an example:
\end_layout
\end_layout
\begin_layout Standard
-To get rid of the frame for weblinks add this to the additional options
- in the document settings under
+To get rid of the special frame for weblinks add this to the additional
+ options in the document settings under
\family sans
PDF
\begin_inset space ~
SubmitButton
\family default
.
- Write inside the inset the label for the button.
+ The label for the button is written into the inset.
Here is an example:
\end_layout
The submit button creates a forms data format (FDF) file (file extension
*.fdf) which is then submitted.
The FDF file contains only the form data.
- They can only be applied to a PDF form if all fields in the form have a
- name.
+ They can only be applied to a PDF form if all elements in the form have
+ a name.
\end_layout
\begin_layout Standard
Note:
\series default
You can only use a submit button if you specified the submit method and
- target in the PDF form environment options! See sec.
+ a target in the inset
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+Form
+\begin_inset space ~
+\end_inset
+
+Parameters
+\family default
+! See sec.
\begin_inset space \thinspace{}
\end_inset
\end_inset
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note:
-\series default
- If you have more than one submit button in your document you must specify
- a name for each of them to avoid \SpecialChar LaTeX
- errors! For example add
-\series bold
-name=submit1
-\series default
- (where
-\series bold
-submit1
-\series default
- is the button name).
-\end_layout
-
-\end_inset
-
-
\end_layout
\begin_layout Subsection
\end_layout
\begin_layout Standard
-A reset button is used to reset all form fields to the initial state.
+A reset button is used to reset all form elements to the initial state.
It is added by inserting the custom inset
\family sans
ResetButton
\family default
.
- Write inside the inset the label for the button.
+ The label for the button is written into the inset.
Here is an example:
\end_layout
\end_inset
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note:
-\series default
- If you have more than one reset button in your document you must specify
- a name for each of them to avoid \SpecialChar LaTeX
- errors! For example add
-\series bold
-name=reset1
-\series default
- (where
-\series bold
-reset1
-\series default
- is the button name).
-\end_layout
-
-\end_inset
-
-
\end_layout
\begin_layout Section
-Form field customization
+Form element customization
\begin_inset CommandInset label
LatexCommand label
-name "sec:Form-field-customization"
+name "sec:Form-element-customization"
\end_inset
\begin_inset space ~
\end_inset
-Style
+Style
\end_layout
\begin_layout Description
\end_inset
.
- It is important that the parameter print is always part of the definition,
- otherwise the fields won't appear in the PDF output.
- The defined style is applied to all fields following the definition.
+ It is important that the parameter
+\emph on
+print
+\emph default
+ is always part of the definition.
+ Otherwise the fields will not appear in the PDF.
+ The defined style is applied to all elements following the definition.
\end_layout
\begin_layout Subsubsection*
\end_layout
\begin_layout Radio Box Style
-print, borderstyle=I, radiosymbol=6
+print, borderstyle=I, radiosymbol=3
\end_layout
\begin_layout Push Button Style
\end_layout
\begin_layout Standard
-The
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+ To see in
+\emph on
+Adobe Reader
+\emph default
+ and
+\emph on
+Acrobat
+\emph default
+ custom background colors you must disable in these programs the highlighting
+ of form fields.
+ (Option
+\begin_inset Quotes eld
+\end_inset
+
+Show border hover color for fields
+\begin_inset Quotes erd
+\end_inset
+
+)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+The option
\series bold
borderstyle
\series default
\series bold
B
\series default
- (bevel), or
+ (bevel) or
\series bold
I
\series default
(inverted bevel).
\end_layout
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note
-\series default
- that the
-\series bold
-value
-\series default
- has only an effect for text fields if a
-\series bold
-name
-\series default
- was specified.
-\end_layout
-
\end_inset
\end_layout
\begin_layout Itemize
-Combo box with dashed, colored border:
+Combo choice menu with dashed, colored border where the last entry is preselecte
+d:
\begin_inset VSpace defskip
\end_inset
\end_layout
\begin_layout Itemize
-Popdown box where only 2
-\begin_inset space ~
-\end_inset
-
-entries are shown and where the last entry is preselected:
+Popdown choice menu where the second entry is preselected:
\begin_inset VSpace defskip
\end_inset
status open
\begin_layout Plain Layout
-popdown, name=country2, value=Az
+popdown, name=country2, default=Ar
\end_layout
\end_inset
\series bold
Note
\series default
- that the
+ that the options
\series bold
borderstyle B
\series default
\series bold
I
\series default
- and also
+ and
\series bold
color
\series default
- has no effect for popdown boxes.
+ have no effect for popdown choice menus.
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
-Radio box with inverted bevel border and symbol number
+Radio choice menu with inverted bevel border and symbol number
\begin_inset space ~
\end_inset
-6 as checkmark:
+3 as checkmark:
\begin_inset VSpace defskip
\end_inset
\series bold
Note
\series default
- that the
+: The options
\series bold
backgroundcolor
\series default
- and
-\series bold
- color
-\series default
- has no effect for push, submit and reset buttons.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-As workaround use a colored box and/or color the box text.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
+,
\series bold
-Note
+color
\series default
- that the
+,
\series bold
height
\series default
\series bold
width
\series default
- has no effect for push, submit and reset buttons.
+ have no effect for push, submit and reset buttons.
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-As workaround a box.
+As workaround use a colored box and/or color the box text.
\end_layout
\begin_layout Itemize
-Submit button without border, with cyan background color and increased height:
+Submit button without border, with cyan background and increased height:
\begin_inset VSpace defskip
\end_inset
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
\end_layout
\begin_layout Section
PDFAction
\family default
.
- The PDF viewer programs
+ The PDF viewers
\emph on
Acrobat
\emph default
\emph default
can handle all possible actions while other PDF viewers might only support
some of them.
- However, all PDF viewer programs support the basic things like printing,
- save
+ However, all PDF viewers support the basic things like printing, save
\begin_inset space ~
\end_inset
Action
\family default
inset.
- A list with possible actions can be found in sec.
+ A list with possible action names can be found in sec.
\begin_inset space \thinspace{}
\end_inset
\begin_layout Standard
The easiest way to customize the buttons is to fill it with a custom box.
- For example the button should be 4
+ For example the button should be 5
\begin_inset space \thinspace{}
\end_inset
-cm wide and have the height of 2 lines.
+cm wide and have the height of 2
+\begin_inset space ~
+\end_inset
+
+lines.
Then create this parbox:
\end_layout
inner_pos "c"
use_parbox 1
use_makebox 0
-width "4cm"
+width "5cm"
special "none"
height "2in"
height_special "totalheight"
inner_pos "c"
use_parbox 1
use_makebox 0
-width "4cm"
+width "5cm"
special "none"
height "2in"
height_special "totalheight"
\end_inset
+\end_layout
+
+\begin_layout PDF Link Setup
+pdfborder={0 0 0}
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+Sets the thickness of the predefined link border to zero as described below.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To customize the border color, border thickness and the distance to the
+ border one changes the border settings of the box.
+ An example with a 4
+\begin_inset space \thinspace{}
+\end_inset
+
+pt thick, teal border:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Flex PDFAction
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+SaveAs
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Boxed
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "5cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "teal"
+backgroundcolor "white"
+status open
+
+\begin_layout Plain Layout
+\noindent
+Save form as
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
-To customize the border color, add the command
+To customize the border thickness, add the command
\series bold
-menubordercolor={r g b}
+pdfborder={0 0 t}
\series default
to the additional options in the document settings under
\family sans
\family default
and replace
\series bold
-r
-\series default
-,
-\series bold
-g
+t
\series default
- and
-\series bold
-b
-\series default
- with a number between 0 and 1 for the colors red, green and blue.
- If you want to change the border color only for certain buttons, use the
- layout
+ with a number that is the thickness in pixels.
+ If you want to change the border thickness only for certain buttons, use
+ the environment
\family sans
PDF
\begin_inset space ~
\family default
before the button and insert there the command
\series bold
-menubordercolor
+pdfborder
\series default
.
The default value of
\series bold
-menubordercolor
+pdfborder
\series default
is
\series bold
-{1 0 0}
+{0 0 1}
\series default
.
\end_layout
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+
+\series bold
+pdfborder
+\series default
+ affects all link types, not only the menu links.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
\begin_layout PDF Link Setup
-menubordercolor={0.1 0.9 0.5}
+pdfborder={0 0 4}
\end_layout
\begin_layout Standard
-An example with
-\series bold
-menubordercolor={0.1 0.9 0.5}
-\series default
-:
+An example with a 4
+\begin_inset space ~
+\end_inset
+
+pixel thick border:
\begin_inset Newline newline
\end_inset
inner_pos "c"
use_parbox 1
use_makebox 0
-width "4cm"
+width "5cm"
special "none"
height "2in"
height_special "totalheight"
\end_layout
\begin_layout Standard
-To change the border width use the command
+To change the border color use the command
\series bold
-pdfborder={0 0 w}
+menubordercolor={r g b}
\series default
where
\series bold
-w
+r
\series default
- is the width in pixels.
- The default value of
+,
\series bold
-pdfborder
+g
\series default
- is
+ and
\series bold
-{0 0 1}
+b
\series default
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
+ are numbers between 0 and 1 for the colors red, green and blue.
+ The default value of
\series bold
-Note:
+menubordercolor
\series default
-
+ is
\series bold
-pdfborder
+{1 0 0}
\series default
- affects all link types, not only the menu links.
-\end_layout
-
-\end_inset
-
-
+.
\end_layout
\begin_layout PDF Link Setup
-pdfborder={0 0 4}, menubordercolor={1 1 0}
+pdfborder={0 0 1}, menubordercolor={0.1 0.9 0.5}
\end_layout
\begin_layout Standard
-An example with a 4
-\begin_inset space ~
-\end_inset
-
-pixel thick yellow border:
+An example with
+\series bold
+menubordercolor={0.1 0.9 0.5}
+\series default
+:
\begin_inset Newline newline
\end_inset
inner_pos "c"
use_parbox 1
use_makebox 0
-width "4cm"
+width "5cm"
special "none"
height "2in"
height_special "totalheight"
inner_pos "c"
use_parbox 1
use_makebox 0
-width "4cm"
+width "5cm"
special "none"
height "2in"
height_special "totalheight"
It is also possible to have dynamic form fields.
This means that depending on the actions of the user fields can (dis)appear
or change their appearance.
- To use this feature, add these lines to your document preamble:
+ To use this feature, add these lines to your LaTeX preamble:
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-Then add the necessary JavaScript code to your document \SpecialChar LaTeX
- preamble or as
- \SpecialChar TeX
+Then add the necessary JavaScript code to your document LaTeX preamble or
+ as \SpecialChar TeX
code to your document.
For info about JavaScript, see its documentation,
\begin_inset CommandInset citation
\emph on
All
\emph default
- JavaScript funtions must be inserted into the same
+ JavaScript functions must be inserted into the same
\family sans
insDLJS
\family default
\begin_layout Standard
The
\family sans
-PDF
-\begin_inset space ~
-\end_inset
-
-form
-\begin_inset space ~
-\end_inset
-
-parameters
+Parameters
\family default
of the following choice menu are
\begin_inset Newline newline
status open
\begin_layout Plain Layout
-keep this emtpy
+keep this empty
\end_layout
\end_inset
\end_layout
\begin_layout Section
-General notes and hints
+General notes
\end_layout
\begin_layout Itemize
-Submitting and applying data requires that all form fields have a name.
+Submitting and applying data requires that all form elements have a name.
\end_layout
\begin_layout Itemize
\begin_layout Itemize
Creating a PDF form requires pdflatex or lualatex.
- Use either the \SpecialChar LyX
+ Use therefore either the \SpecialChar LyX
export formats
\family sans
PDF (pdflatex)
\emph on
Acrobat
\emph default
- custom background colors you must disable in these programs to highlight
- the available form fields in the PDF.
+ custom background colors you must disable in these programs the highlighting
+ of form fields.
+ (Option
+\begin_inset Quotes eld
+\end_inset
+
+Show border hover color for fields
+\begin_inset Quotes erd
+\end_inset
+
+)
\end_layout
\begin_layout Bibliography