Div | ||
---|---|---|
| ||
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. |
Div |
---|
...
|
...
The |
...
...
Forms |
...
plugin |
...
can |
...
be |
...
used |
...
to |
...
publish |
...
...
Forms |
...
through |
...
the |
...
Application |
...
Server. |
...
User |
...
can |
...
open |
...
the |
...
...
Form, |
...
fill |
...
in |
...
the |
...
fields |
...
and |
...
submit |
...
the |
...
...
Form. |
...
The |
...
submitted |
...
...
Form |
...
is |
...
sent |
...
to |
...
the |
...
plugin |
...
and |
...
the |
...
values |
...
of |
...
the |
...
fields |
...
are |
...
extracted |
...
from |
...
the |
...
...
Form |
...
and |
...
stored |
...
in |
...
the |
...
database. |
...
For |
...
the |
...
plugin |
...
to |
...
receive |
...
the |
...
filled |
...
out |
...
...
Form |
...
and |
...
to |
...
extract |
...
the |
...
data, |
...
the |
...
following |
...
is |
...
required: |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
The |
...
...
Forms |
...
plugin |
...
is |
...
a |
...
100% |
...
server |
...
side |
...
operating |
...
plugin |
...
and |
...
interacts |
...
directly |
...
with |
...
the |
...
database |
...
for |
...
retrieving |
...
the |
...
form |
...
and |
...
storing |
...
the |
...
filled |
...
in |
...
field |
...
values. |
...
Basic |
...
Workflow |
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Creating |
...
...
Forms |
...
The |
...
...
Forms |
...
plugin |
...
supports |
...
...
Forms |
...
(both |
...
FDF |
...
and |
...
XFA) |
...
created |
...
using |
...
...
...
.
|
...
|
...
In |
...
order |
...
for |
...
the |
...
...
Forms |
...
plugin |
...
to |
...
work |
...
with |
...
a |
...
specific |
...
...
Form, |
...
it |
...
is |
...
required |
...
that |
...
the |
...
...
Form |
...
has: |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Uniquely |
...
named |
...
fields |
...
|
...
the |
...
user |
...
has |
...
filled |
...
out |
...
a |
...
form |
...
and |
...
submits |
...
it, |
...
the |
...
...
Forms |
...
plugin |
...
retrieves |
...
all |
...
the |
...
fields |
...
and |
...
their |
...
values |
...
and |
...
stores |
...
them |
...
in |
...
the |
...
database. |
...
For |
...
each |
...
field |
...
name, |
...
it |
...
stores |
...
only |
...
one |
...
value. |
...
This |
...
means |
...
that |
...
unless |
...
each |
...
field |
...
is |
...
uniquely |
...
named, |
...
values |
...
will |
...
get |
...
lost. |
...
Submit |
...
button |
...
|
...
...
form |
...
needs |
...
to |
...
contain |
...
a |
...
submit |
...
button |
...
to |
...
allow |
...
the |
...
user |
...
to |
...
post |
...
back |
...
the |
...
filled |
...
in |
...
form |
...
back |
...
to |
...
the |
...
...
Forms |
...
plugin |
...
on |
...
the |
...
Application |
...
Server. |
...
|
...
Adobe |
...
Acrobat |
...
or |
...
Adobe |
...
LiveCycle, |
...
create |
...
a |
...
submit |
...
button |
...
on |
...
the |
...
form. |
...
For |
...
FDF |
...
form |
...
add |
...
the |
...
following |
...
JavaScript |
...
code |
...
to |
...
the |
...
mouse-up |
...
action |
...
on |
...
the |
...
button: |
...
|
...
|
...
For |
...
XFA |
...
form |
...
add |
...
the |
...
following |
...
JavaScript |
...
code |
...
to |
...
the |
...
preSubmit |
...
action |
...
on |
...
the |
...
button: |
...
|
...
|
...
For |
...
XFA |
...
form |
...
the |
...
form |
...
must |
...
be |
...
submitted |
...
as |
...
XML |
...
using |
...
UTF-8 |
...
encoding. |
...
Also |
...
in |
...
this |
...
javascript |
...
code |
...
Form |
...
and |
...
Page |
...
must |
...
be |
...
replaced |
...
with |
...
the |
...
actual |
...
names |
...
present |
...
in |
...
the |
...
...
document. |
...
Automatic |
...
submit |
...
button |
...
injection |
...
|
...
...
Forms |
...
plugin |
...
contains |
...
logic |
...
to |
...
automatically |
...
insert |
...
the |
...
submit |
...
button |
...
into |
...
the |
...
...
Form. |
...
The |
...
automatic |
...
insert |
...
of |
...
the |
...
submit |
...
button |
...
is |
...
only |
...
supported |
...
when |
...
the |
...
...
Form |
...
is |
...
opened |
...
by |
...
users |
...
using |
...
Adobe |
...
Acrobat, |
...
not |
...
when |
...
opened |
...
through |
...
Adobe |
...
Reader. |
...
Also, |
...
it |
...
is |
...
not |
...
supported |
...
for |
...
XFA |
...
forms. |
...
To |
...
enable |
...
automatic |
...
insertion |
...
of |
...
the |
...
submit |
...
button, |
...
the |
...
'skip_placing_submit_button' |
...
field |
...
on |
...
the |
...
pdf_template |
...
record |
...
needs |
...
to |
...
be |
...
set |
...
to |
...
one |
...
('1'). |
...
When |
...
set |
...
to |
...
zero |
...
('0') |
...
the |
...
button |
...
will |
...
not |
...
be |
...
inserted |
...
automatically. |
...
Hidden |
...
fields |
...
|
...
...
Form |
...
needs |
...
to |
...
contain |
...
two |
...
hidden |
...
fields, |
...
one |
...
named |
...
'servoy_pdf_submit_url' |
...
and |
...
one |
...
named |
...
'servoy_action_id'. |
...
These |
...
fields |
...
will |
...
be |
...
automatically |
...
populated |
...
by |
...
the |
...
...
Forms |
...
plugin |
...
and |
...
are |
...
used |
...
to |
...
retrieve |
...
the |
...
filled |
...
in |
...
data |
...
back. |
...
For |
...
XFA |
...
forms, |
...
these |
...
hidden |
...
fields |
...
are |
...
also |
...
used |
...
in |
...
order |
...
to |
...
put |
...
the |
...
form |
...
to |
...
readonly. |
...
This |
...
is |
...
needed |
...
because |
...
the |
...
XFA |
...
form |
...
cannot |
...
be |
...
flattened |
...
out-of-the-box, |
...
just |
...
as |
...
the |
...
FDF |
...
form. |
...
So, |
...
this |
...
javascript |
...
must |
...
be |
...
added |
...
in |
...
initialize |
...
event |
...
of |
...
the |
...
form: |
...
|
...
|
...
In this javascript code Form, Page and submiButton must be replaced with the actual names present in the PDF document. Also this code only works for PDF version 9 and later when access property was introduced for form. In order to support earlier versions all fields in form must be parsed and put to nonInteractive (in javascript code). Accessing the PDF FormsThe PDF Forms plugin exposes two dynamic url's for accessing the PDF Forms:
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
Redirect urlAfter submitting the PDF form, the browser will redirect to the redirect_url, |
...
if |
...
specified. |
...
If |
...
no |
...
redirect_url |
...
is |
...
specified |
...
on |
...
the |
...
specific |
...
action, |
...
the |
...
...
Forms |
...
plugin |
...
will |
...
lookup |
...
the |
...
redirect_url |
...
on |
...
the |
...
pdf_template |
...
record |
...
linked |
...
to |
...
the |
...
pdf_action. |
...
If |
...
both |
...
the |
...
pdf_action |
...
and |
...
pdf_template |
...
do |
...
not |
...
specify |
...
a |
...
redirect_url, |
...
the |
...
browser |
...
will |
...
be |
...
redirected |
...
to |
...
a |
...
default |
...
page |
...
that |
...
displays |
...
the |
...
text |
...
'Data |
...
successfully |
...
stored,close |
...
this |
...
window' |
...
and |
...
will |
...
attempt |
...
to |
...
close |
...
the |
...
window. |
...
Automatic |
...
pdf_action |
...
closing |
...
When |
...
the |
...
user |
...
submits |
...
a |
...
...
Form, |
...
the |
...
related |
...
pdf_action |
...
record |
...
will |
...
be |
...
marked |
...
as |
...
closed. |
...
When |
...
the |
...
user |
...
would |
...
try |
...
to |
...
re-open |
...
a |
...
...
Form |
...
that |
...
was |
...
previously |
...
submitted, |
...
thus |
...
the |
...
pdf_action |
...
record |
...
is |
...
marked |
...
as |
...
closed, |
...
instead |
...
a |
...
page |
...
will |
...
be |
...
shown |
...
in |
...
the |
...
browser, |
...
displaying |
...
the |
...
text |
...
'Security |
...
violation, |
...
use |
...
the |
...
...
system |
...
to |
...
edit |
...
pdfs'. |
...
Re-using |
...
data |
...
When |
...
the |
...
...
Forms |
...
plugin |
...
opens |
...
a |
...
...
Form |
...
linked |
...
to |
...
an |
...
pdf_action, |
...
it |
...
will |
...
fill |
...
any |
...
field |
...
in |
...
the |
...
...
Form |
...
with |
...
data |
...
that |
...
is |
...
already |
...
stored |
...
in |
...
the |
...
pdf_form_values |
...
table, |
...
related |
...
to |
...
the |
...
pdf_action |
...
record. |
...
As |
...
can |
...
be |
...
seen |
...
in |
...
the |
...
ERD |
...
below, |
...
the |
...
link |
...
between |
...
the |
...
data |
...
stored |
...
in |
...
the |
...
pdf_form_values |
...
table |
...
and |
...
the |
...
pdf_action |
...
table |
...
is |
...
not |
...
done |
...
based |
...
on |
...
the |
...
primary |
...
key |
...
of |
...
the |
...
pdf_actions |
...
table, |
...
but |
...
on |
...
a |
...
separate |
...
form_id |
...
column. |
...
This |
...
allows |
...
for |
...
the |
...
following: |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Entity |
...
Relation |
...
Diagram |
...
The |
...
ERD |
...
below |
...
is |
...
the |
...
minimum |
...
required |
...
by |
...
the |
...
plugin |
...
to |
...
operate. |
...
The |
...
data |
...
model |
...
needs |
...
to |
...
be |
...
present |
...
in |
...
one |
...
of |
...
the |
...
Database |
...
Servers. |
...
By |
...
default, |
...
the |
...
DataBase |
...
Server |
...
named |
...
'pdf_forms' |
...
will |
...
be |
...
used, |
...
but |
...
this |
...
can |
...
be |
...
overwritten |
...
using |
...
the |
...
'pdf_forms_plugin_servername' |
...
setting |
...
of |
...
the |
...
plugin, |
...
available |
...
on |
...
the |
...
Admin |
...
page |
...
under |
...
...
...
...
. |
...
pdf_templates
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
pdf_actions |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
pdf_form_values |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
Template |
...
location |
...
options |
...
When |
...
a |
...
...
Form |
...
is |
...
shown |
...
to |
...
the |
...
user |
...
a |
...
related |
...
...
Form |
...
template |
...
is |
...
automatically |
...
retrieved. |
...
This |
...
...
Form |
...
Template |
...
is |
...
by |
...
default |
...
loaded |
...
from |
...
the |
...
"actual_pdf_form" |
...
column |
...
from |
...
the |
...
pdf_templates |
...
table. |
...
There |
...
are |
...
two |
...
options |
...
to |
...
override |
...
the |
...
location |
...
from |
...
where |
...
the |
...
template |
...
is |
...
retrieved: |
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
The |
...
overrideTemplateLocation |
...
can |
...
be |
...
any |
...
location |
...
that |
...
is |
...
accessible |
...
from |
...
the |
...
machine |
...
where |
...
the |
...
Servoy |
...
Web |
...
Client |
...
is |
...
running, |
...
for |
...
example |
...
../application_server/server/webapps/ROOT/servoy-webclient/.. |
...
The |
...
order |
...
of |
...
precedence |
...
for |
...
...
Form |
...
Template |
...
location |
...
is: |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
HTML Table | ||||
---|---|---|---|---|
| ||||
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
HTML Table | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|