Scripting support for HTML5 forms scripting-support-for-html-forms
CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.
JavaScript, FormCalc properties, and methods supported in HTML5 forms are as listed below:
$event event
$host host
field field
Form form
Property
Description
Exception
formNodes
Returns a list of all form model objects that are bound to a specified data object.
InstanceManager instancemanager
Property
Description
name
An identifier that is used to identify this element in script expressions.
occur
Describes the constraints over the number of allowable instances for its enclosing container.
min
Specifies the minimum number of instances that can be instantiated.
max
Specifies the maximum number of instances that can be instantiated.
count
Specifies the current number of instances instantiated.
setInstances
Adds or removes the specified subforms or subform sets from this node.
addInstance
Adds a new instance of a subform or subform set to this node.
removeInstance
Removes a subform or subform set from this node.
moveInstance
Moves a child object of a form model object to another specified location within the form model. The corresponding data model information for the object is also relocated within the data model.
insertInstance
Inserts a new instance of a subform or subform set to this node.
list list
Property
Description
length
The number of elements in the list.
item
A zero-based index into the collection.
append
Appends a node to the end of the node list.
remove
Removes a node from the node list.
insert
Inserts a node before a specific node in the node list.
node node
Property
Description
Exception
createNode
Creates new node based on a valid class name.
None
isContainer
Specifies whether this object is a container object.
None
isNull
Indicates whether the current data value is a null value.
None
resolveNode
Evaluates the specified SOM expression, beginning with the current XML form object model object, and returns the value of the object specified in the SOM expression.
None
resolveNodes
Evaluates the specified SOM expression, beginning with the current XML form object model object, and returns the value of the object specified in the SOM expression.
None
oneOfChild
Creates new node based on a valid class name.
None
getElement
Returns a specified child object.
None
getAttribute
Gets a specified property value.
None
setAttribute
Sets the value of a specified property.
None
model model
Property
Description
Exception
NA
NA
NA
Subform subform
submit submit
Property
Description
target
The URL to which the data is submitted. Omission of this attribute implies the XFA processing application obtains the URI using a product-specific technique, such as accessing product-specific information in the config object.
tree tree
subformset subformset
Property
Description
Exception
instanceManager
The instanceManager object manages the instance creation, removal, and movement of form model objects.
None
content content
Property
Description
Exception
isNull
Indicates whether the current data value is the null value.
dataValue datavalue
Property
Description
Exception
isNull
Indicates whether the current data value is the null value.
edge edge
fill fill
linear linear
line line
pattern pattern
radial radial
stipple stipple
draw draw
corner corner
checkButton checkbutton
choiceList choicelist
dateTimeEdit datetimeedit
Property
Description
Exception
border
The border object describes the border surrounding dateTimeEdit object.
Image image
imageEdit imageedit
Property
Description
Exception
border
The border object describes the border surrounding imageEdit object.
numericEdit numericedit
Property
Description
Exception
border
The border object describes the border surrounding an object.
none
object object
rectangle rectangle
textEdit textedit
exclGroup exclgroup
arc arc
border border
$layout layout
items items
Property
Description
Exception
presence
Specifies an object’s visibility.
None
FormCalc formcalc
FormCalc is an XFA-specific language for creating e-form centric logic and calculations roots. FormCalculation provides a powerful set of build functions.
FormCalc Supported Functions formcalc-supported-functions
FormCalc Expression Support formcalc-expression-support
Acrobat API Support acrobat-api-support
-
Arithmetic Functions
- Abs()
- Avg()
- Ceil()
- Count()
- Floor()
- Max()
- Min()
- Mod()
- Round()
- Sum()
-
Scientific Functions
- Acos()
- Asin()
- Atan()
- Atan2()
- Cos()
- Sin()
- Tan()
- Exp()
- Log()
- Pow()
- Sqrt()
- Deg2Rad()
- Rad2Deg()
- Pi()
-
Financial Functions
- Apr()
- Cterm()
- Fv()
- Ipmt()
- Npv()
- Pmt()
- Ppmt()
- Pv()
- Rate()
- Term()
-
Logical Functions
- Choose()
- If()
- Oneof()
- Within()
-
String Functions
- At()
- Concat()
- Left()
- Len()
- Lower()
- Ltrim()
- Replace()
- Right()
- Rtrim()
- Space()
- Stuff()
- Substr()
- Upper()
- WordNum()
-
Date and Time
- Date()
- num2date()
- DateFmt()
Supported XFA events supported-xfa-events
The following client sided XFA events are supported:
- Initialize
- Validate
- Calculate
- Click
- Enter
- Exit
- Change
- ValidationState
NOTE
HTML5 forms are rendered on the client-side (browser). It is recommended to use client side validate and calculate scripts instead of server-sided scripts.
recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da