]> git.lyx.org Git - lyx.git/blobdiff - lib/examples/PDF-form.lyx
When a counter is stepped, reset recursively all slaves
[lyx.git] / lib / examples / PDF-form.lyx
index 4bc159c21e11a6bc591e14d107c97ad2dd754265..c6438704a263173296145a5eb2c3bd766aeecdbc 100644 (file)
@@ -1,28 +1,56 @@
-#LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 474
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 508
 \begin_document
 \begin_header
+\save_transient_properties true
+\origin /systemlyxdir/examples/
 \textclass scrartcl
 \begin_preamble
-% to be able to use custom colors
-\usepackage[svgnames,rgb]{xcolor}
+% used to check for needed LaTeX packages
+\usepackage{ifthen}
+
+% check for package insdljs
+% used for JavScript code
+\newboolean{insdljs}
+\IfFileExists{insdljs.sty}
+ {\usepackage[pdftex]{insdljs}
+  \setboolean{insdljs}{true}}
+ {\setboolean{insdljs}{false}}
 
-\usepackage[pdftex]{insdljs}
 \pdfcatalog{/AA \the\pdflastobj\space 0 R}
-\begin{insDLJS}[exaaae]{exaaae}{JavaScript}
+
+\ifinsdljs % only execute if package insdljs is installed
+
+ \begin{insDLJS}[exaaae]{exaaae}{JavaScript}
+
   function validateTime(){
    this.delay = true;
    if((event.value == "u") || (event.value == "unlimited")) {
-   this.getField("from").display = display.hidden;
-   this.getField("to").display = display.hidden;
-  } else {
-   this.getField("from").display = display.visible;
-   this.getField("to").display = display.visible;
-   this.getField("from").setFocus();
-  }
-  this.delay = false;
+    this.getField("from").display = display.hidden;
+    this.getField("to").display = display.hidden;
+   } else {
+    this.getField("from").display = display.visible;
+    this.getField("to").display = display.visible;
+    this.getField("from").setFocus();
+   }
+   this.delay = false;
   }
-\end{insDLJS}
+ function checkNumber() {
+  event.rc = true;
+  if (!Number(event.value))
+  {
+   app.alert("Value must be a number!");
+   event.value = "";
+  }  else {
+   event.target.textColor = color.green;
+ }
+
+}
+
+ \end{insDLJS}
+
+\fi % end \ifinsdljs
 
 % if pdflatex is used
 \usepackage{ifpdf}
@@ -44,18 +72,18 @@ pdfform
 \language_package default
 \inputencoding auto
 \fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_math auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
 \font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
+\font_sf_scale 100 100
+\font_tt_scale 100 100
 \graphics default
-\default_output_format default
+\default_output_format pdf2
 \output_sync 0
 \bibtex_command bibtex
 \index_command default
@@ -124,7 +152,7 @@ pdfform
 status open
 
 \begin_layout Plain Layout
-action=mailto:forms@lyx.test?subject={The submitted PDF form},method=post
+action=mailto:forms@lyx.test?subject=The submitted PDF form, method=post
 \end_layout
 
 \end_inset
@@ -140,6 +168,26 @@ Description of the module PDF Form
 Uwe Stöhr
 \end_layout
 
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+To export all parts of this document to PDF the \SpecialChar LaTeX
+-package 
+\series bold
+insdljs
+\series default
+ must be installed.
+ If it is not installed you can export the document anyway but the example
+ in the section about dynamic form fields won't appear in the output.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 By loading the module PDF
 \begin_inset space ~
@@ -179,7 +227,8 @@ PDF
 
 Form
 \family default
- from LyX's dropdown menu at the beginning of the document.
+ from \SpecialChar LyX
+'s dropdown menu at the beginning of the document.
  If only a part of the document should be a form, add 
 \family sans
 Begin
@@ -214,7 +263,7 @@ Note:
 
 \begin_layout Standard
 If the form data should be submitted to a server or the like, then you must
- specify the URL to where it should be submitted as parameter of the 
+ specify the URL as parameter of the 
 \family sans
 Begin
 \begin_inset space ~
@@ -229,7 +278,7 @@ Form
  environment.
  This is done by using the menu 
 \family sans
-Insert\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
 PDF
 \begin_inset space ~
 \end_inset
@@ -243,23 +292,25 @@ parameters
 .
  For example in this document the following was inserted to the parameter
  inset:
-\begin_inset Newline newline
-\end_inset
+\end_layout
 
+\begin_layout Standard
 
 \series bold
-action=mailto:forms@lyx.test?subject={The submitted PDF form},method=post
-\series default
-
+action=mailto:forms@lyx.test?subject=The submitted PDF form,
 \begin_inset Newline newline
 \end_inset
 
+method=post
+\end_layout
+
+\begin_layout Standard
 This sends the form data as email to 
 \emph on
 forms@lyx.test
 \emph default
-.
- the email subject is 
+ when the user presses the submit button.
+ The email subject will be 
 \begin_inset Quotes eld
 \end_inset
 
@@ -276,7 +327,25 @@ post
 \series bold
 get
 \series default
-.)
+.) For more about submitting see sec.
+\begin_inset space \thinspace{}
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Submit-button"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
 \end_layout
 
 \begin_layout Section
@@ -302,7 +371,7 @@ TextField
 \family default
  using the menu 
 \family sans
-Insert\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
 Custom
 \begin_inset space ~
 \end_inset
@@ -321,6 +390,14 @@ Insets
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=customer
+\end_layout
+
+\end_inset
 
 Enter your name here:
 \end_layout
@@ -331,33 +408,78 @@ Enter your name here:
 \end_layout
 
 \begin_layout Standard
-All form fields can be customized by adding a parameter inset to them.
- To do this, set the cursor into the field inset and use the menu 
+You must also specify a field name for text fields: Set the cursor into
+ its 
 \family sans
-Insert\SpecialChar \menuseparator
-PDF
-\begin_inset space ~
+Params
+\family default
+ inset.
+ There insert for example the parameter 
+\series bold
+name=customer
+\series default
+ (where 
+\series bold
+customer
+\series default
+ is the field name).
+\end_layout
+
+\begin_layout Standard
+Using the same name for several text fields results in an automatic duplication
+ of the inserted text.
+ This is for example useful if the user should input a date that should
+ appear at different places in the form.
+\begin_inset Newline newline
 \end_inset
 
-form
+Here are 2
 \begin_inset space ~
 \end_inset
 
-parameters
-\family default
-.
+fields as example: Fill one and see that the other one will also be filled
+ automatically:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Flex TextField
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=identic
 \end_layout
 
-\begin_layout Standard
-\begin_inset Note Greyedout
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Flex TextField
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
+name=identic
+\end_layout
+
+\end_inset
+
 
-\series bold
-Note:
-\series default
- All braces and brackets in form parameters must be inserted as TeX code!
 \end_layout
 
 \end_inset
@@ -366,11 +488,23 @@ Note:
 \end_layout
 
 \begin_layout Standard
-Here is a customized text field with a width of 5
+All form fields can be customized by adding parameters.
+\end_layout
+
+\begin_layout Standard
+Here is a customized multiline text field with a width of 60
 \begin_inset space \thinspace{}
 \end_inset
 
-cm and a proposed content:
+% of the text width, 3
+\begin_inset space \thinspace{}
+\end_inset
+
+cm height and a proposed content:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -379,12 +513,13 @@ cm and a proposed content:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-name=name, width=5cm, bordercolor={0.5 1 0.5}, borderstyle=U, value={Testman}
+name=customer2, multiline, width=0.6
+\backslash
+textwidth, height=3cm, value={Testman}
 \end_layout
 
 \end_inset
@@ -415,7 +550,7 @@ Note:
 
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "sec:Form-field-and"
+reference "sec:Form-field-customization"
 
 \end_inset
 
@@ -447,6 +582,14 @@ CheckBox
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=age
+\end_layout
+
+\end_inset
 
 Are you older than 18 years?
 \end_layout
@@ -456,6 +599,23 @@ Are you older than 18 years?
 
 \end_layout
 
+\begin_layout Standard
+You must also specify a field name for check boxes: Insert for example the
+ parameter 
+\series bold
+name=age
+\series default
+ (where 
+\series bold
+age
+\series default
+ is the field name) into the 
+\family sans
+Params
+\family default
+ inset.
+\end_layout
+
 \begin_layout Subsection
 Choice menu
 \end_layout
@@ -466,12 +626,17 @@ A choice menu is added by inserting the custom inset
 ChoiceMenu
 \family default
 .
- The label is inserted into the 
+ A label for the inset is added by using the menu 
 \family sans
+Insert\SpecialChar menuseparator
 Label
 \family default
- inset.
- The choices are inserted to the inset as comma-separated list.
+.
+ Insert the label text into this inset.
+\begin_inset Newline newline
+\end_inset
+
+The different choices are inserted to the inset as comma-separated list.
  There are 3
 \begin_inset space ~
 \end_inset
@@ -492,52 +657,10 @@ Combo The choices are listed in a combo box (dropdown list) but the user
 Popdown All choices are listed below each other.
  It the filed is not high enough a scroll bar is automatically added to
  the field.
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note:
-\series default
- For the popdown type you must also specify a field name! For example write
-\series bold
-popdown, name=country
-\series default
- (where 
-\series bold
-country
-\series default
- is the field name).
-\end_layout
-
-\end_inset
-
-
 \end_layout
 
 \begin_layout Standard
-To determine the choice menu type, set the cursor into the inset and use
- the menu 
-\family sans
-Insert\SpecialChar \menuseparator
-PDF
-\begin_inset space ~
-\end_inset
-
-form
-\begin_inset space ~
-\end_inset
-
-parameters
-\family default
-.
- There insert the parameter 
+To determine the choice menu type, add the parameter 
 \series bold
 radio
 \series default
@@ -554,6 +677,10 @@ popdown
 
 \begin_layout Standard
 Here is an example for the radio type:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -562,12 +689,11 @@ Here is an example for the radio type:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-radio
+radio, name=radio
 \end_layout
 
 \end_inset
@@ -592,6 +718,10 @@ Sex:
 
 \begin_layout Standard
 Here is an example for the combo type:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -600,12 +730,11 @@ Here is an example for the combo type:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-combo
+combo, name=combo
 \end_layout
 
 \end_inset
@@ -630,6 +759,10 @@ Country:
 
 \begin_layout Standard
 Here is an example for the popdown type:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -638,7 +771,6 @@ Here is an example for the popdown type:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -666,14 +798,35 @@ Country:
 
 \end_layout
 
+\begin_layout Standard
+You must also specify a field name for choice menus: Insert for example
+ the parameter 
+\series bold
+name=country
+\series default
+ (where 
+\series bold
+country
+\series default
+ is the field name) into the 
+\family sans
+Params
+\family default
+ inset.
+\end_layout
+
 \begin_layout Standard
 It is recommended to add a short name for every choice to be able to access
- them and to know which one was chosen by the user- This is done by adding
+ them and to know which one was chosen by the user.
+ This is done by adding 
 \series bold
 =name
 \series default
- behind each choice.
+ behind each choice (where 
+\series bold
+name
+\series default
+ is the choice name).
  For example the radio type example contains this choice list:
 \series bold
  male=m, female=f
@@ -721,7 +874,6 @@ default=m
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -749,7 +901,7 @@ Sex:
 
 \end_layout
 
-\begin_layout Description
+\begin_layout Standard
 \begin_inset Note Greyedout
 status open
 
@@ -758,7 +910,8 @@ status open
 \series bold
 Note:
 \series default
- Due to a bug in the LaTeX package 
+ Due to a bug in the \SpecialChar LaTeX
+ package 
 \series bold
 hyperref
 \series default
@@ -768,6 +921,13 @@ hyperref
 \end_inset
 
 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
 \end_layout
 
 \begin_layout Subsection
@@ -782,14 +942,21 @@ PushButton
 .
  Write inside the inset the label for the button.
  Here is an example:
-\begin_inset Newline newline
-\end_inset
-
+\end_layout
 
+\begin_layout Standard
 \begin_inset Flex PushButton
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
 
 Don't click on this button or your fridge will be destroyed!!!
 \end_layout
@@ -802,25 +969,49 @@ Don't click on this button or your fridge will be destroyed!!!
 \begin_layout Standard
 The action that is triggered by pressing the button is specified by JavaScript
  code.
- To specify it, set the cursor into the inset and use the menu 
-\family sans
-Insert\SpecialChar \menuseparator
-PDF
-\begin_inset space ~
-\end_inset
-
-form
-\begin_inset space ~
-\end_inset
-
-parameters
-\family default
-.
- There insert the parameter 
+ To specify it, add the parameter 
 \series bold
 onclick={}
 \series default
- and write the JavaScript code between the braces.
+ and insert the JavaScript code between the braces.
+ For info about JavaScript, see its documentation, 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "JavaScript"
+
+\end_inset
+
+.
+ In the following example this JavaScript code was used:
+\begin_inset Newline newline
+\end_inset
+
+
+\series bold
+app.alert(
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+"
+\end_layout
+
+\end_inset
+
+What the hell? Now you destroyed your fridge.
+ Congratulations.
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+"
+\end_layout
+
+\end_inset
+
+)
 \end_layout
 
 \begin_layout Standard
@@ -828,72 +1019,68 @@ onclick={}
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-onclick={app.alert("What the hell? Now you destroyed your fridge.
- Congratulations.")}
-\end_layout
+onclick={app.alert(
+\begin_inset ERT
+status collapsed
 
-\end_inset
+\begin_layout Plain Layout
 
-Don't click on this button or your fridge will be destroyed!!!
+"
 \end_layout
 
 \end_inset
 
+What the hell? Now you destroyed your fridge.
+ Congratulations.
+\begin_inset ERT
+status collapsed
 
-\end_layout
+\begin_layout Plain Layout
 
-\begin_layout Standard
-For info about JavaScript, see its documentation, 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "JavaScript"
+"
+\end_layout
 
 \end_inset
 
-.
+)}
 \end_layout
 
-\begin_layout Standard
-A common usage for pus buttons is to open a weblink.
- Such a button is created by inserting the command 
-\series bold
+\end_inset
 
-\backslash
-href
-\series default
- into the button inset.
-\series bold
+Don't click on this button or your fridge will be destroyed!!!
+\end_layout
 
-\backslash
-href
-\series default
- is used in the scheme
-\begin_inset Newline newline
 \end_inset
 
 
-\series bold
-
-\backslash
-href{link target}{text}
 \end_layout
 
 \begin_layout Standard
-In the following button this code was used:
-\begin_inset Newline newline
-\end_inset
+\begin_inset Note Greyedout
+status open
 
+\begin_layout Plain Layout
 
 \series bold
+Note:
+\series default
+ All quote characters in form parameters must be inserted as \SpecialChar TeX
+ code!
+\end_layout
 
-\backslash
-href{http://wiki.lyx.org}{Information how to fill out this form}
+\end_inset
+
+
+\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.
+ Here is an example:
 \end_layout
 
 \begin_layout Standard
@@ -901,10 +1088,24 @@ href{http://wiki.lyx.org}{Information how to fill out this form}
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset href
+LatexCommand href
+name "Information how to fill out this form"
+target "http://wiki.lyx.org"
+
+\end_inset
 
 
-\backslash
-href{http://wiki.lyx.org}{Information how to fill out this form}
 \end_layout
 
 \end_inset
@@ -916,7 +1117,11 @@ href{http://wiki.lyx.org}{Information how to fill out this form}
 To get rid of the frame for weblinks add this to the additional options
  in the document settings under 
 \family sans
-PDF properties
+PDF
+\begin_inset space ~
+\end_inset
+
+properties
 \family default
 :
 \end_layout
@@ -932,15 +1137,15 @@ if your push button border color is red (the default), otherwise use the
  same color definition as for your push button border color.
 \end_layout
 
-\begin_layout Standard
-\begin_inset Newpage newpage
-\end_inset
+\begin_layout Subsection
+Submit button
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Submit-button"
 
+\end_inset
 
-\end_layout
 
-\begin_layout Subsection
-Submit button
 \end_layout
 
 \begin_layout Standard
@@ -952,15 +1157,13 @@ SubmitButton
 .
  Write inside the inset the label for the button.
  Here is an example:
-\begin_inset Newline newline
-\end_inset
-
+\end_layout
 
+\begin_layout Standard
 \begin_inset Flex SubmitButton
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -978,6 +1181,14 @@ Send your data via email
 
 \end_layout
 
+\begin_layout Standard
+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.
+\end_layout
+
 \begin_layout Standard
 \begin_inset Note Greyedout
 status open
@@ -1000,7 +1211,8 @@ reference "sec:Preparation"
 \end_inset
 
  for the description.
- If there are no specifications you will get LaTeX errors!
+ If there are no specifications you will get \SpecialChar LaTeX
+ errors!
 \end_layout
 
 \end_inset
@@ -1018,7 +1230,8 @@ status open
 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 LaTeX errors! For example write 
+ a name for each of them to avoid \SpecialChar LaTeX
+ errors! For example add 
 \series bold
 name=submit1
 \series default
@@ -1047,15 +1260,13 @@ ResetButton
 .
  Write inside the inset the label for the button.
  Here is an example:
-\begin_inset Newline newline
-\end_inset
-
+\end_layout
 
+\begin_layout Standard
 \begin_inset Flex ResetButton
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -1083,13 +1294,14 @@ status open
 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 LaTeX errors! For example write 
+ a name for each of them to avoid \SpecialChar LaTeX
+ errors! For example add 
 \series bold
-name=submit1
+name=reset1
 \series default
  (where 
 \series bold
-submit1
+reset1
 \series default
  is the button name).
 \end_layout
@@ -1100,262 +1312,111 @@ submit1
 \end_layout
 
 \begin_layout Section
-PDF viewer action buttons
-\end_layout
+Form field customization
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Form-field-customization"
 
-\begin_layout Standard
-One often needs basic actions to be done by the PDF viewer program.
- For example to print the form.
- Such PDF program-specific actions can be triggered by adding inserting
- the custom inset 
-\family sans
-PDFAction
-\family default
-.
- The PDF viewer programs 
-\emph on
-Acrobat
-\emph default
- and 
-\emph on
-Adobe Reader
-\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
-\begin_inset space ~
 \end_inset
 
-as, view in fullscreen etc..
+
 \end_layout
 
 \begin_layout Standard
-To specify the action insert its name to the 
-\family sans
-Action
-\family default
- inset.
- A list with possible actions can be found in sec.
-\begin_inset space \thinspace{}
-\end_inset
+Since all form elements should look uniform, one can determine their layout
+ using the following styles:
+\end_layout
 
-5 
-\begin_inset Quotes eld
+\begin_layout Description
+Text
+\begin_inset space ~
 \end_inset
 
-Acrobat-specific behavior
-\begin_inset Quotes erd
+Field
+\begin_inset space ~
 \end_inset
 
- of the documentation of the LaTeX package 
-\series bold
-hyperref
-\series default
-, 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "hyperref"
+Style
+\end_layout
 
+\begin_layout Description
+Check
+\begin_inset space ~
 \end_inset
 
-.
-\end_layout
+Box
+\begin_inset space ~
+\end_inset
 
-\begin_layout Standard
-Here are some examples:
+Style 
 \end_layout
 
 \begin_layout Description
-Printing: 
-\begin_inset Flex PDFAction
-status open
-
-\begin_layout Plain Layout
-
-\begin_inset Argument 1
-status open
-
-\begin_layout Plain Layout
-Print
-\end_layout
+List
+\begin_inset space ~
+\end_inset
 
+Box
+\begin_inset space ~
 \end_inset
 
-Print the document
+Style affects all choice menu types
 \end_layout
 
+\begin_layout Description
+Combo
+\begin_inset space ~
 \end_inset
 
+Box
+\begin_inset space ~
+\end_inset
 
+Style affects only the combo box style
 \end_layout
 
 \begin_layout Description
-Save
+Popdown
 \begin_inset space ~
 \end_inset
 
-as: 
-\begin_inset Flex PDFAction
-status open
-
-\begin_layout Plain Layout
-
-\begin_inset Argument 1
-status open
+Box
+\begin_inset space ~
+\end_inset
 
-\begin_layout Plain Layout
-SaveAs
+Style affects only the popdown box style
 \end_layout
 
+\begin_layout Description
+Radio
+\begin_inset space ~
 \end_inset
 
-Save document as
+Box
+\begin_inset space ~
+\end_inset
+
+Style affects only the radio box style
 \end_layout
 
+\begin_layout Description
+Push
+\begin_inset space ~
 \end_inset
 
+Button
+\begin_inset space ~
+\end_inset
 
+Style
 \end_layout
 
 \begin_layout Description
-View
+Submit
 \begin_inset space ~
 \end_inset
 
-in
-\begin_inset space ~
-\end_inset
-
-fullscreen: 
-\begin_inset Flex PDFAction
-status open
-
-\begin_layout Plain Layout
-
-\begin_inset Argument 1
-status open
-
-\begin_layout Plain Layout
-FullScreen
-\end_layout
-
-\end_inset
-
-View the form in fullscreen
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Form field and button customization
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Form-field-and"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Since all form elements should look uniform, one can determine their layout
- using the following styles:
-\end_layout
-
-\begin_layout Description
-Text
-\begin_inset space ~
-\end_inset
-
-Field
-\begin_inset space ~
-\end_inset
-
-Style
-\end_layout
-
-\begin_layout Description
-Check
-\begin_inset space ~
-\end_inset
-
-Box
-\begin_inset space ~
-\end_inset
-
-Style 
-\end_layout
-
-\begin_layout Description
-List
-\begin_inset space ~
-\end_inset
-
-Box
-\begin_inset space ~
-\end_inset
-
-Style affects all choice menu types
-\end_layout
-
-\begin_layout Description
-Combo
-\begin_inset space ~
-\end_inset
-
-Box
-\begin_inset space ~
-\end_inset
-
-Style affects only the combo box style
-\end_layout
-
-\begin_layout Description
-Popdown
-\begin_inset space ~
-\end_inset
-
-Box
-\begin_inset space ~
-\end_inset
-
-Style affects only the popdown box style
-\end_layout
-
-\begin_layout Description
-Radio
-\begin_inset space ~
-\end_inset
-
-Box
-\begin_inset space ~
-\end_inset
-
-Style affects only the radio box style
-\end_layout
-
-\begin_layout Description
-Push
-\begin_inset space ~
-\end_inset
-
-Button
-\begin_inset space ~
-\end_inset
-
-Style
-\end_layout
-
-\begin_layout Description
-Submit
-\begin_inset space ~
-\end_inset
-
-Button
+Button
 \begin_inset space ~
 \end_inset
 
@@ -1392,7 +1453,8 @@ Forms optional parameters
 \begin_inset Quotes erd
 \end_inset
 
- of the documentation of the LaTeX package 
+ of the documentation of the \SpecialChar LaTeX
+ package 
 \series bold
 hyperref
 \series default
@@ -1414,50 +1476,55 @@ Here are some examples:
 \end_layout
 
 \begin_layout Text Field Style
-
-print, bordercolor={red},borderstyle=U, backgroundcolor=lightgray, color=lime
+print, bordercolor=red, borderstyle=U, backgroundcolor=lightgray, color=lime,
+ maxlen=10, align=2, charsize=16pt
 \end_layout
 
 \begin_layout Check Box Style
-
 print, borderstyle=S, checkboxsymbol=
 \backslash
 ding{55}
 \end_layout
 
 \begin_layout Combo Box Style
-
 print, bordercolor={0.33 0.66 0.33}, borderstyle=D
 \end_layout
 
 \begin_layout Popdown Box Style
-
 print, menulength=2
 \end_layout
 
 \begin_layout Radio Box Style
-
 print, borderstyle=I, radiosymbol=6
 \end_layout
 
 \begin_layout Push Button Style
-
-print, borderstyle=B, bordercolor={lime}
+print, borderstyle=B, bordercolor=lime
 \end_layout
 
 \begin_layout Submit Button Style
-
-print, borderwidth=0
+print, borderwidth=0, bordercolor=white
 \end_layout
 
 \begin_layout Reset Button Style
-
-print, bordercolor={lime}
+print, bordercolor=lime
 \end_layout
 
-\begin_layout Standard
-Text field with gray background, lime text color and a red border only below
- the field:
+\begin_layout Itemize
+Text field with gray background, lime text color, a red border only below
+ the field, right alignment, 16
+\begin_inset space \thinspace{}
+\end_inset
+
+pt font size and a limitation for maximal 10
+\begin_inset space ~
+\end_inset
+
+characters to insert:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -1466,6 +1533,14 @@ Text field with gray background, lime text color and a red border only below
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
 
 Enter your name here:
 \end_layout
@@ -1528,10 +1603,14 @@ name
 
 \end_layout
 
-\begin_layout Standard
+\begin_layout Itemize
 Check box with normal border and symbol 
 \backslash
 ding{55}:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -1540,6 +1619,14 @@ ding{55}:
 status open
 
 \begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
 
 Are you older than 18 years?
 \end_layout
@@ -1582,8 +1669,12 @@ key "pifont"
 .
 \end_layout
 
-\begin_layout Standard
+\begin_layout Itemize
 Combo box with dashed, colored border:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -1592,12 +1683,11 @@ Combo box with dashed, colored border:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-combo, default=Az
+combo, name=combo2, default=Az
 \end_layout
 
 \end_inset
@@ -1620,12 +1710,16 @@ Country:
 
 \end_layout
 
-\begin_layout Standard
+\begin_layout Itemize
 Popdown box where only 2
 \begin_inset space ~
 \end_inset
 
 entries are shown and where the last entry is preselected:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -1634,7 +1728,6 @@ entries are shown and where the last entry is preselected:
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -1663,6 +1756,10 @@ Country:
 \end_layout
 
 \begin_layout Standard
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Note Greyedout
 status open
 
@@ -1691,13 +1788,13 @@ color
 
 \end_layout
 
-\begin_layout Standard
+\begin_layout Itemize
 Radio box with inverted bevel border and symbol number
 \begin_inset space ~
 \end_inset
 
 6 as checkmark:
-\begin_inset Newline newline
+\begin_inset VSpace defskip
 \end_inset
 
 
@@ -1709,12 +1806,11 @@ Radio box with inverted bevel border and symbol number
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-radio
+radio, name=radio2
 \end_layout
 
 \end_inset
@@ -1737,30 +1833,79 @@ Sex:
 
 \end_layout
 
-\begin_layout Standard
+\begin_layout Itemize
 Push button with a bevel border and colored text:
-\end_layout
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
 
-\begin_layout Standard
 \begin_inset Flex PushButton
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-onclick={app.alert("Why do you click this?")}
+onclick={app.alert(
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+"
+\end_layout
+
+\end_inset
+
+Why do you click this?
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+"
+\end_layout
+
+\end_inset
+
+)}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Frameless
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 1
+width ""
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "lime"
+status open
+
+\begin_layout Plain Layout
+
+\color red
+Don't click on this button!!!
 \end_layout
 
 \end_inset
 
 
-\backslash
-colorbox{lime}{
-\backslash
-textcolor{red}{Don't click on this button or your fridge will be destroyed!!!}}
 \end_layout
 
 \end_inset
@@ -1769,6 +1914,10 @@ textcolor{red}{Don't click on this button or your fridge will be destroyed!!!}}
 \end_layout
 
 \begin_layout Standard
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Note Greyedout
 status open
 
@@ -1794,75 +1943,151 @@ backgroundcolor
 \end_layout
 
 \begin_layout Standard
-As workaround use the command 
-\series bold
-
-\backslash
-colorbox
-\series default
- as described in sec.
-\begin_inset space \thinspace{}
-\end_inset
+As workaround use a colored box and/or color the box text.
+\end_layout
 
- 5.7 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
 
-Colored Boxes
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
 
- in LyX's 
-\emph on
-EmbeddedObjects
-\emph default
- manual and 
 \series bold
-
-\backslash
-textcolor
+Note
 \series default
- that is used is used in the scheme
-\begin_inset Newline newline
+ that the 
+\series bold
+height 
+\series default
+and 
+\series bold
+width
+\series default
+ has no effect for push, submit and reset buttons.
+\end_layout
+
 \end_inset
 
 
-\series bold
+\end_layout
+
+\begin_layout Standard
+As workaround a box.
+\end_layout
+
+\begin_layout Itemize
+Submit button without border, with cyan background color and increased height:
+\begin_inset VSpace defskip
+\end_inset
 
-\backslash
-textcolor{color}{characters to color}
-\series default
 
 \begin_inset Newline newline
 \end_inset
 
-In the button above this code was used:
+
+\begin_inset Flex SubmitButton
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=submit2
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "5cm"
+special "none"
+height "4in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "cyan"
+status open
+
+\begin_layout Plain Layout
+Send your data via mail
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Reset button with a width of 7
+\begin_inset space \thinspace{}
+\end_inset
+
+cm:
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
 
-\family sans
+\begin_inset Flex ResetButton
+status open
 
-\backslash
-colorbox{lime}{
-\backslash
-textcolor{red}{Don't click on this button or your fridge will be destroyed!!!}}
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=reset2
 \end_layout
 
-\begin_layout Standard
-\begin_inset Note Greyedout
+\end_inset
+
+
+\begin_inset Box Frameless
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 1
+width "7cm"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
 status open
 
 \begin_layout Plain Layout
+Reset the form
+\end_layout
+
+\end_inset
+
 
-\series bold
-Note
-\series default
- that the 
-\series bold
-height 
-\series default
-has no effect for push, submit and reset buttons.
 \end_layout
 
 \end_inset
@@ -1870,121 +2095,479 @@ has no effect for push, submit and reset buttons.
 
 \end_layout
 
+\begin_layout Section
+PDF viewer action buttons
+\end_layout
+
 \begin_layout Standard
-As workaround use 
-\series bold
+One often needs basic actions to be done by the PDF viewer program.
+ For example to print the form.
+ Such PDF program-specific actions can be triggered by adding inserting
+ the custom inset 
+\family sans
+PDFAction
+\family default
+.
+ The PDF viewer programs 
+\emph on
+Acrobat
+\emph default
+ and 
+\emph on
+Adobe Reader
+\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
+\begin_inset space ~
+\end_inset
 
-\backslash
-raisebox
-\series default
- as described in sec.
+as, view in fullscreen etc..
+\end_layout
+
+\begin_layout Standard
+To specify the action insert its name to the 
+\family sans
+Action
+\family default
+ inset.
+ A list with possible actions can be found in sec.
 \begin_inset space \thinspace{}
 \end_inset
 
- 5.6.2 
+5 
 \begin_inset Quotes eld
 \end_inset
 
-Vertical Alignment
+Acrobat-specific behavior
 \begin_inset Quotes erd
 \end_inset
 
- in LyX's 
-\emph on
-EmbeddedObjects
-\emph default
- manual.
- In the button below this code was used:
-\begin_inset Newline newline
+ of the documentation of the \SpecialChar LaTeX
+ package 
+\series bold
+hyperref
+\series default
+, 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "hyperref"
+
 \end_inset
 
+.
+\end_layout
+
+\begin_layout Standard
+Here are some examples:
+\end_layout
+
+\begin_layout Description
+Printing: 
+\begin_inset Flex PDFAction
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Print
+\end_layout
+
+\end_inset
+
+Print the document
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+Save
+\begin_inset space ~
+\end_inset
+
+as: 
+\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
+
+Save document as
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+View
+\begin_inset space ~
+\end_inset
+
+in
+\begin_inset space ~
+\end_inset
+
+fullscreen: 
+\begin_inset Flex PDFAction
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+FullScreen
+\end_layout
+
+\end_inset
+
+View the form in fullscreen
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Action button customization
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Action-button-customization"
+
+\end_inset
 
-\family sans
 
-\backslash
-raisebox{-0.8cm}{}
-\backslash
-raisebox{1cm}{}Send your data via mail
 \end_layout
 
 \begin_layout Standard
-\begin_inset Note Greyedout
+Customizing the action buttons requires the usage of boxes because things
+ like the width, height and border separation cannot be specified as button
+ parameters.
+\end_layout
+
+\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
+\begin_inset space \thinspace{}
+\end_inset
+
+cm wide and have the height of 2 lines.
+ Then create this parbox:
+\end_layout
+
+\begin_layout Standard
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "4cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+\noindent
+Save form as
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+inside a 
+\family sans
+PDFAction
+\family default
+ inset.
+ This is the result:
+\end_layout
+
+\begin_layout Standard
+\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 Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "4cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
 status open
 
 \begin_layout Plain Layout
+Save form as
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
 
+\end_layout
+
+\begin_layout Standard
+To customize the border color, add the command 
 \series bold
-Note
+menubordercolor={r g b}
 \series default
- that the 
+ to the additional options in the document settings under 
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+properties
+\family default
+ and replace 
 \series bold
-width 
+r
 \series default
-has no effect for push, submit and reset buttons.
-\end_layout
+, 
+\series bold
+g
+\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 
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
 
+link
+\begin_inset space ~
 \end_inset
 
+setup
+\family default
+ before the button and insert there the command 
+\series bold
+menubordercolor
+\series default
+.
+ The default value of 
+\series bold
+menubordercolor
+\series default
+ is 
+\series bold
+{1 0 0}
+\series default
+.
+\end_layout
 
+\begin_layout PDF Link Setup
+menubordercolor={0.1 0.9 0.5}
 \end_layout
 
 \begin_layout Standard
-As workaround use
+An example with 
 \series bold
-\backslash
-makebox
+menubordercolor={0.1 0.9 0.5}
 \series default
- as described in sec.
-\begin_inset space \thinspace{}
+:
+\begin_inset Newline newline
 \end_inset
 
- 5.6.2 
-\begin_inset Quotes eld
+
+\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
 
-Vertical Alignment
-\begin_inset Quotes erd
+
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "4cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+\noindent
+Save form as
+\end_layout
+
 \end_inset
 
- in LyX's 
-\emph on
-EmbeddedObjects
-\emph default
- manual.
- In the reset button below this code was used:
-\begin_inset Newline newline
+
+\end_layout
+
 \end_inset
 
 
-\family sans
+\end_layout
 
-\backslash
-makebox[7cm]{Reset the form}
+\begin_layout Standard
+To change the border width use the command 
+\series bold
+pdfborder={0 0 w}
+\series default
+ where 
+\series bold
+w
+\series default
+ is the width in pixels.
+ The default value of 
+\series bold
+pdfborder
+\series default
+ is 
+\series bold
+{0 0 1}
+\series default
+.
 \end_layout
 
 \begin_layout Standard
-\begin_inset Flex SubmitButton
+\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
+pdfborder={0 0 4}, menubordercolor={1 1 0}
+\end_layout
+
+\begin_layout Standard
+An example with a 4
+\begin_inset space ~
+\end_inset
+
+pixel thick yellow 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
-name=submit2
+SaveAs
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "4cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+\noindent
+Save form as
 \end_layout
 
 \end_inset
 
 
-\backslash
-colorbox{cyan}{
-\backslash
-raisebox{-0.8cm}{}
-\backslash
-raisebox{1cm}{}Send your data via mail}
 \end_layout
 
 \end_inset
@@ -1993,23 +2576,59 @@ raisebox{1cm}{}Send your data via mail}
 \end_layout
 
 \begin_layout Standard
-\begin_inset Flex ResetButton
+To change the background color use a colored box.
+\end_layout
+
+\begin_layout PDF Link Setup
+pdfborder={0 0 0}
+\end_layout
+
+\begin_layout Standard
+An example without a border and with lime background color:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Flex PDFAction
 status open
 
-\begin_layout Plain Layout
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+SaveAs
+\end_layout
+
+\end_inset
+
 
-\begin_inset Argument 1
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 1
+use_makebox 0
+width "4cm"
+special "none"
+height "2in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "lime"
 status open
 
 \begin_layout Plain Layout
-name=reset2
+\noindent
+Save form as
 \end_layout
 
 \end_inset
 
 
-\backslash
-makebox[7cm]{Reset the form}
 \end_layout
 
 \end_inset
@@ -2017,6 +2636,10 @@ makebox[7cm]{Reset the form}
 
 \end_layout
 
+\begin_layout PDF Link Setup
+pdfborder={0 0 1}, menubordercolor={1 0 0}
+\end_layout
+
 \begin_layout Section
 Dynamic form fields
 \end_layout
@@ -2049,8 +2672,10 @@ space 0 R}
 \end_layout
 
 \begin_layout Standard
-Then ad the necessary JavaScript code to your preamble or as TeX code to
- your document.
+Then add the necessary JavaScript code to your document \SpecialChar LaTeX
+ preamble or as
+ \SpecialChar TeX
+ code to your document.
  For info about JavaScript, see its documentation, 
 \begin_inset CommandInset citation
 LatexCommand cite
@@ -2062,7 +2687,38 @@ key "JavaScript"
 \end_layout
 
 \begin_layout Standard
-In the following example this code was used:
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+ifinsdljs
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The following section will only be displayed when the \SpecialChar LaTeX
+ package 
+\series bold
+insdljs
+\series default
+ is installed.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For the following choice menu this JavaScript code was used:
 \end_layout
 
 \begin_layout Standard
@@ -2151,16 +2807,62 @@ end{insDLJS}
 \end_layout
 
 \begin_layout Standard
-\begin_inset Flex ChoiceMenu
+\begin_inset Note Greyedout
 status open
 
 \begin_layout Plain Layout
 
+\series bold
+Note:
+\series default
+\emph on
+All
+\emph default
+ JavaScript funtions must be inserted into the same 
+\family sans
+insDLJS
+\family default
+ environment.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+form
+\begin_inset space ~
+\end_inset
+
+parameters
+\family default
+ of the following choice menu are
+\begin_inset Newline newline
+\end_inset
+
+
+\series bold
+name=contract,radio,default=tl,validate={validateTime();}
+\end_layout
+
+\begin_layout Standard
+\begin_inset Flex ChoiceMenu
+status open
+
+\begin_layout Plain Layout
 \begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-name=contract,radio,value=tl,validate={validateTime();}
+name=contract,radio,default=tl,validate={validateTime();}
 \end_layout
 
 \end_inset
@@ -2181,14 +2883,36 @@ Job contract:
 \end_inset
 
 
+\begin_inset VSpace defskip
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top">
+<column alignment="center" valignment="top">
+<row>
+<cell alignment="left" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+From:
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
 \begin_inset Flex TextField
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -2198,7 +2922,7 @@ name=from,width=10em
 
 \end_inset
 
-From:
+
 \end_layout
 
 \end_inset
@@ -2206,12 +2930,50 @@ From:
 
 \end_layout
 
-\begin_layout Standard
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset VSpace -1.5mm
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+To:
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
 \begin_inset Flex TextField
 status open
 
 \begin_layout Plain Layout
-
 \begin_inset Argument 1
 status open
 
@@ -2221,7 +2983,7 @@ name=to,width=10em
 
 \end_inset
 
-To:
+
 \end_layout
 
 \end_inset
@@ -2229,12 +2991,72 @@ To:
 
 \end_layout
 
-\begin_layout End PDF Form
-\begin_inset Note Note
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To check and assure that the user only enters a number to a text field you
+ can for example use this JavaScript code:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=TeX"
+inline false
 status open
 
 \begin_layout Plain Layout
-keep this emtpy
+
+function checkNumber() {
+\end_layout
+
+\begin_layout Plain Layout
+
+ event.rc = true;
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (!Number(event.value)) {
+\end_layout
+
+\begin_layout Plain Layout
+
+  app.alert("Value must be a number!");
+\end_layout
+
+\begin_layout Plain Layout
+
+  event.value = "";
+\end_layout
+
+\begin_layout Plain Layout
+
+ } else {
+\end_layout
+
+\begin_layout Plain Layout
+
+  event.target.textColor = color.green;
+\end_layout
+
+\begin_layout Plain Layout
+
+}
 \end_layout
 
 \end_inset
@@ -2242,25 +3064,124 @@ keep this emtpy
 
 \end_layout
 
-\begin_layout Section
-General hints
+\begin_layout Standard
+An example text field: 
+\begin_inset Flex TextField
+status open
+
+\begin_layout Plain Layout
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+name=onlyNumbers, align=1, validate={checkNumber();}
 \end_layout
 
-\begin_layout Itemize
-To be able to use all kinds of colors and color definitions you must load
- the LaTeX package 
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+else
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The following will be displayed when the \SpecialChar LaTeX
+ package 
 \series bold
-xcolor
+insdljs
 \series default
- in the document preamble this way:
-\begin_inset Newline newline
+ is not installed:
+\end_layout
+
 \end_inset
 
 
+\end_layout
+
+\begin_layout Standard
+You need to install the package 
 \series bold
+insdljs
+\series default
+ to see the content of this section in the output.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
 
 \backslash
-usepackage[svgnames,rgb]{xcolor}
+fi
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout End PDF Form
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+keep this emtpy
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+General notes and hints
+\end_layout
+
+\begin_layout Itemize
+Submitting and applying data requires that all form fields have a name.
+\end_layout
+
+\begin_layout Itemize
+All braces, brackets, backslashes and quote characters in form parameters
+ must be inserted as \SpecialChar TeX
+ code!
+\end_layout
+
+\begin_layout Itemize
+Creating a PDF form requires pdflatex or lualatex.
+ Use either the \SpecialChar LyX
+ export formats 
+\family sans
+PDF (pdflatex)
+\family default
+ or 
+\family sans
+PDF (Lua\SpecialChar TeX
+)
+\family default
+.
 \end_layout
 
 \begin_layout Itemize
@@ -2309,11 +3230,10 @@ target "http://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/manual.pdf"
 
 \end_inset
 
- of the LaTeX package 
+ of the \SpecialChar LaTeX
+ package 
 \series bold
 hyperref
-\series default
-.
 \end_layout
 
 \begin_layout Bibliography
@@ -2331,11 +3251,10 @@ target "http://mirrors.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf"
 
 \end_inset
 
- of the LaTeX package 
+ of the \SpecialChar LaTeX
+ package 
 \series bold
 pifont
-\series default
-.
 \end_layout
 
 \end_body