-#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 503
\begin_document
\begin_header
+\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}
\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
status open
\begin_layout Plain Layout
-To export all parts of this document to PDF the LaTeX-package
+To export all parts of this document to PDF the \SpecialChar LaTeX
+-package
\series bold
insdljs
\series default
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
environment.
This is done by using the menu
\family sans
-Insert\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
PDF
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
-reference "sub:Submit-button"
+reference "subsec:Submit-button"
\end_inset
\family default
using the menu
\family sans
-Insert\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
Custom
\begin_inset space ~
\end_inset
is the field name).
\end_layout
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note:
-\series default
- All braces, brackets, backslashes and quote characters in form parameters
- must be inserted as TeX code!
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
\begin_layout Standard
Using the same name for several text fields results in an automatic duplication
of the inserted text.
\begin_layout Plain Layout
name=customer2, multiline, width=0.6
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
\backslash
-textwidth
-\end_layout
-
-\end_inset
-
-, height=3cm, value=
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-{
-\end_layout
-
-\end_inset
-
-Testman
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
-\end_layout
-
-\end_inset
-
-
+textwidth, height=3cm, value={Testman}
\end_layout
\end_inset
.
A label for the inset is added by using the menu
\family sans
-Insert\SpecialChar \menuseparator
+Insert\SpecialChar menuseparator
Label
\family default
.
\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
onclick={}
\series default
and insert the JavaScript code between the braces.
-\end_layout
+ For info about JavaScript, see its documentation,
+\begin_inset CommandInset citation
+LatexCommand cite
+key "JavaScript"
-\begin_layout Standard
-\begin_inset Flex PushButton
-status open
+\end_inset
-\begin_layout Plain Layout
-\begin_inset Argument 1
-status open
+.
+ In the following example this JavaScript code was used:
+\begin_inset Newline newline
+\end_inset
-\begin_layout Plain Layout
-onclick=
+
+\series bold
+app.alert(
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
-{
+"
\end_layout
\end_inset
-app.alert(
+What the hell? Now you destroyed your fridge.
+ Congratulations.
\begin_inset ERT
status collapsed
\end_inset
-What the hell? Now you destroyed your fridge.
- Congratulations.
+)
+\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
+onclick={app.alert(
\begin_inset ERT
status collapsed
\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
\end_inset
\end_layout
\begin_layout Standard
-For info about JavaScript, see its documentation,
-\begin_inset CommandInset citation
-LatexCommand cite
-key "JavaScript"
+\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
\end_inset
-.
+
\end_layout
\begin_layout Standard
Submit button
\begin_inset CommandInset label
LatexCommand label
-name "sub:Submit-button"
+name "subsec:Submit-button"
\end_inset
\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
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 add
+ a name for each of them to avoid \SpecialChar LaTeX
+ errors! For example add
\series bold
name=submit1
\series default
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 add
+ a name for each of them to avoid \SpecialChar LaTeX
+ errors! For example add
\series bold
name=reset1
\series default
\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
status open
\begin_layout Plain Layout
-onclick=
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-{
-\end_layout
-
-\end_inset
-
-app.alert(
+onclick={app.alert(
\begin_inset ERT
status collapsed
\end_inset
-)
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
+)}
\end_layout
\end_inset
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
+\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
-
-\backslash
-colorbox{lime}{
-\end_layout
-
-\end_inset
-
-
\color red
Don't click on this button!!!
-\color inherit
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
\end_layout
\end_inset
\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
-
- 5.7
-\begin_inset Quotes eld
-\end_inset
-
-Colored Boxes
-\begin_inset Quotes erd
-\end_inset
-
- in LyX's
-\emph on
-EmbeddedObjects
-\emph default
- manual.
-\begin_inset Newline newline
-\end_inset
-
-In the button above this code was used:
-\begin_inset Newline newline
-\end_inset
-
-
-\family sans
-
-\backslash
-colorbox{lime}{Don't click on this button!!!}
-\family default
-
-\begin_inset Newline newline
-\end_inset
-
-and the button text was colored.
+As workaround use a colored box and/or color the box text.
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-As workaround use the box method described in sec.
-\begin_inset space \thinspace{}
-\end_inset
-
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Action-button-customization"
-
-\end_inset
-
-
+As workaround a box.
\end_layout
\begin_layout Itemize
\end_inset
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-colorbox{cyan}{
-\end_layout
-
-\end_inset
-
-
\begin_inset Box Frameless
position "c"
hor_pos "c"
special "none"
height "4in"
height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "cyan"
status open
\begin_layout Plain Layout
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Send your data via mail
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
+Send your data via mail
\end_layout
\end_inset
special "none"
height "1in"
height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
status open
\begin_layout Plain Layout
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Reset the form
+Reset the form
\end_layout
\end_inset
\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
Action button customization
\begin_inset CommandInset label
LatexCommand label
-name "sub:Action-button-customization"
+name "subsec:Action-button-customization"
\end_inset
special "none"
height "2in"
height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
status open
\begin_layout Plain Layout
PDFAction
\family default
inset.
- To center the text in the button add
-\series bold
-
-\backslash
-centering
-\series default
- as TeX code right before the button text.
This is the result:
\end_layout
special "none"
height "2in"
height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
status open
\begin_layout Plain Layout
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Save form as
+Save form as
\end_layout
\end_inset
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
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Save form as
+Save form as
\end_layout
\end_inset
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
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Save form as
+Save form as
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-To change the background color insert the command
-\series bold
-
-\backslash
-colorbox{color}{
-\series default
- at the beginning of the button inset and a
-\series bold
-}
-\series default
- at the end.
-
-\series bold
-color
-\series default
- is hereby the name of the color as described in sec.
-\begin_inset space \thinspace{}
-\end_inset
-
-5.7
-\begin_inset Quotes eld
-\end_inset
-
-Colored Boxes
-\begin_inset Quotes erd
-\end_inset
-
- of LyX's
-\emph on
-EmbeddedObjects
-\emph default
- manual.
+To change the background color use a colored box.
\end_layout
\begin_layout PDF Link Setup
\end_inset
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-colorbox{lime}{
-\end_layout
-
-\end_inset
-
-
\begin_inset Box Frameless
position "c"
hor_pos "c"
special "none"
height "2in"
height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "lime"
status open
\begin_layout Plain Layout
\noindent
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-centering
-\end_layout
-
-\end_inset
-
- Save form as
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
+Save form as
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-Then add the necessary JavaScript code to your document LaTeX 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
status open
\begin_layout Plain Layout
-The following section will only be displayed when the LaTeX package
+The following section will only be displayed when the \SpecialChar LaTeX
+ package
\series bold
insdljs
\series default
status open
\begin_layout Plain Layout
-name=contract,radio,default=tl,validate=
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-{
-\end_layout
-
-\end_inset
-
-validateTime();
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
-\end_layout
-
-\end_inset
-
-
+name=contract,radio,default=tl,validate={validateTime();}
\end_layout
\end_inset
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
-<features rotate="0" tabularvalignment="middle">
+<features tabularvalignment="middle">
<column alignment="left" valignment="top">
<column alignment="center" valignment="top">
<row>
status open
\begin_layout Plain Layout
-name=onlyNumbers, align=1, validate=
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-{
-\end_layout
-
-\end_inset
-
-checkNumber();
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}
-\end_layout
-
-\end_inset
-
-
+name=onlyNumbers, align=1, validate={checkNumber();}
\end_layout
\end_inset
status open
\begin_layout Plain Layout
-The following will be displayed when the LaTeX package
+The following will be displayed when the \SpecialChar LaTeX
+ package
\series bold
insdljs
\series default
\begin_layout Itemize
All braces, brackets, backslashes and quote characters in form parameters
- must be inserted as TeX code!
+ must be inserted as \SpecialChar TeX
+ code!
\end_layout
\begin_layout Itemize
-It is not possible to create a PDF form using XeTeX.
- Use either the LyX export formats
+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 (LuaTeX)
+PDF (Lua\SpecialChar TeX
+)
\family default
.
\end_layout
-\begin_layout Itemize
-To be able to use all kinds of colors and color definitions you must load
- the LaTeX package
-\series bold
-xcolor
-\series default
- in the document preamble this way:
-\begin_inset Newline newline
-\end_inset
-
-
-\series bold
-
-\backslash
-usepackage[svgnames,rgb]{xcolor}
-\end_layout
-
\begin_layout Itemize
To see in
\emph on
\end_inset
- of the LaTeX package
+ of the \SpecialChar LaTeX
+ package
\series bold
hyperref
\end_layout
\end_inset
- of the LaTeX package
+ of the \SpecialChar LaTeX
+ package
\series bold
pifont
\end_layout