Help > Learning Resources > Tips for creating PDFs > Supported scripting in Acro Forms

Supported scripting in Acro Forms

1. HTTP replies for submit actions

Fluix presents HTTP replies with Content-Type “text/plain” and “text/ html” to the user. For other content  types the “Form successfully submitted.” is shown. 

2. Objects scriptable in Fluix

field Object

Properties

Methods

event Object

Properties

doc Object

Properties

Methods

app Object

Methods

util Object

Methods

3. Custom JS API

 

flx_CopyPage(nSourcePage, nPage)

Copies a source page and inserts it into a document after specified page index. Defined on a document level.

This function represents a simplified routine of manually copying & pasting a single page via page manager in Fluix iOS app (available since app v. 2.36).

Arguments:

Return Value: The function returns boolean result of the operation

Side effect: Function may display alerts using standard app.alert() PDF JavaScript method (NOTE: The function fails silently in case invalid page indices are passed as arguments)

4. Workflow JS API

app.fluixUser

This property can be used to pre-fill/get User full name, User Group(s) and Company name

The property app.fluixUser contains the following keys:

  1. fullName — user full name in Fluix
  2. companyName — company name in Fluix
  3. groups — the array of groups (strings)

fluixShouldSubmit

This is a special function fluixShouldSubmit(submitRuleName) which should be defined on a document level.

Fluix calls this function upon document submit on device of User App (e.g. to validate the fields, user groups, etc.)

Argument: The only function argument is a string, the name of submit rule from admin portal

Return Value: The function should return boolean true when submit is allowed or false if not.

Side effect: Function may display alerts using standard app.alert() PDF JavaScript method. Alerts may contain Yes / No buttons that could allow PDF author to display non-fatal warning.

Was this article helpful?
Thanks for your feedback!
Oops, something went wrong. Please, try again later.
We’re sorry about that, please contact our support for help.
0 out of 0 found this helpful

Sign Up to Our Product Newsletter

The latest updates from our Product team, straight
to your inbox