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
- event
- doc
- app
- util
- console
field Object
Properties
- borderColor
- borderStyle
- charLimit
- currentValueIndices
- defaultValue
- display
- fillColor
- hidden
- name
- numItems
- page
- readonly
- rect
- required
- strokeColor
- textColor
- textSize
- type
- userName
- value
- valueAsString
Methods
- buttonGetCaption
- buttonImportIcon, parameters are not supported
- buttonSetCaption
- checkThisBox
- clearItems
- defaultIsChecked
- deleteItemAt, nIdx is required
- getArray
- getItemAt
- insertItemAt
- isBoxChecked
- setFocus
- setItems
event Object
Properties
- change
- changeEx
- name
- rc
- selStart
- selEnd
- source
- target
- targetName
- type
- value
- willCommit
doc Object
Properties
- calculate
- numFields
- numPages
- pageNum
- URL, can be used in combination with ” pdfefile://” scheme to transfer data to a form.
Methods
- calculateNow
- deletePages
- getField
- getNthFieldName
- gotoNamedDest
- mailDoc
- mailForm
- submitForm, supported cSubmitAs values: FDF, XFDF, HTML, PDF.
- resetForm
app Object
Methods
- alert
- launchURL
- mailMsg
- openDoc, Ignores all parameters except “cPath”. cPath is a relative path according to the current document. Returns null.
util Object
Methods
- printd
- printf
- printx
- scand, Note that Fluix is more strict than Acrobat Pro to correspondence cDate to cFormat.
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:
- nSourcePage – (required) the zero-based index of the page to copy
- nPage – (required) the zero-based index of the page after which the copied page is inserted (-1 means before the first page)
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:
- fullName — user full name in Fluix
- companyName — company name in Fluix
- 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.