Skip to main content
Kinetic Community

Form Model

The form object represents the Form that is being accessed. Many of the properties and methods are accessible within the bundle.

Properties

anonymous

Indicates whether the submission will capture the username in the metadata fields (closedBycreatedBysubmittedBy, andupdatedBy) or not. If the form is set to anonymous, the ‘anonymous’ username will be stored in the metadata fields. Returns true if the anonymous, otherwise false.

${form.anonymous}

attributes

A list of all attributes applied to the form.

${form.attributes}

bridgedResources

A list of bridged resources applied to the form.

${form.bridgedResources}

categories

A list of categories applied to the form.

${form.categories}

customHeadContent

The custom head content defined on the form. If present, this usually includes custom Javascript or CSS styling that pertains to this form only. Otherwise if the content needs to be shared amongst multiple forms, it is better to add as resource files in the bundle.

${form.customHeadContent}

description

A detailed description indicating any details or extra information about the form.

${form.description}

fields

A list of all Field objects on the form.

${form.allFields}

fieldsMap

A map keyed with the field name to the Field object. This map contains all fields on the form.

${form.fieldsMap}

kapp

The Kapp the form belongs to.

${form.kapp}

name

The name of the form.

${form.name}

pages

A list of Page objects on the form.

${form.pages}

securityPolicies

A list of Security Policy objects applied to the form.

${form.securityPolicies}

slug

The slug value of the form. This value must be unique within the Kapp.

${form.slug}

status

The status of the form. Possible values are:

  • Draft
  • Active
  • Inactive
${form.status}

submissionLabelExpression

Defines what the label of the submission should be. If this value is blank, it will use the defaultSubmissionLabelExpressionproperty defined on the Kapp.

${form.submissionLabelExpression}

title

The title of the form contains the name of the Space and name of the Kapp the form belongs to, and the name of the Form. The format is {space.name} > {kapp.name} > {form.name}.

${form.title}

type

The Type object this form identifies with. Form Types are defined on the Kapp, and forms can belong to one of the values.

${form.type}

typeName

The name of the Type object this form identifies with. Form Types are defined on the Kapp, and forms can belong to one of the values. This is a shortcut for ${form.type.name} if you don’t need the entire Type object.

${form.typeName}

Methods

getAttribute(name)

Returns the attribute identified by the name parameter if it exists.

${form.getAttribute(name)}

getAttributeValue(name)

Returns the value of the attribute identified by the name parameter if it exists and if the attribute only supports a single value. This is a shortcut for ${form.getAttribute(name).value} if you don’t need the entire Attribute object, or you have not tested if the attribute exists.

${form.getAttributeValue(name)}

getAttributeValues(name)

Returns a list of values of the attribute identified by the name parameter if it exists and if the attribute support multiple values. This is a shortcut for ${form.getAttribute(name).values} if you don’t need the entire Attribute object, or you have not tested if the attribute exists.

${form.getAttributeValues(name)}

hasAttribute(name)

Tests if the attribute identified by the name parameter exists. Returns true if the attribute does exist, otherwise false.

${form.hasAttribute(name)}

hasAttributeValue(name, value)

Tests if the attribute identified by the name parameter has the value identified by the value parameter. Returns true if the attribute does have the value, otherwise false.

${form.hasAttributeValue(name, value)}

getBridgedResource(name)

Returns the BridgedResource object on the form identified by the name parameter.

${form.getBridgedResource(name)}

getCategory(name)

Returns the Category object on the form identified by the name parameter.

${form.getCategory(name)}

getField(name)

Returns the Field object on the form identified by the name parameter. This method looks up the field using the field name.

${form.getField(name)}

getFieldByKey(key)

Returns the Field object on the form identified by the key parameter. This method looks up the field using the field key.

${form.getFieldByKey(key)}

getFieldKey(name)

Returns the field key of the Field object on the form identified by the name parameter. This is a shortcut for${form.getField(name).key} if you don’t need the entire Field object.

${form.getFieldKey(name)}

getFieldName(key)

Returns the field name of the Field object on the form identified by the key parameter. This is a shortcut for${form.getFieldByKey(key).name} if you don’t need the entire Field object.

${form.getFieldName(key)}

getKappField(name)

Returns the Field object on the Kapp identified by the name parameter. This method looks up the field using the field name.

${form.getKappField(name)}

getPage(name)

Returns the Page object on the form identified by the name parameter.

${form.getPage(name)}

getPageIndex(page)

Returns the index of the page order on the form for the Page object identified by the page parameter.

${form.getPageIndex(page)}

getSecurityPolicy(endpoint)

Returns the SecurityPolicy object on the form identified by the endpoint parameter.

${form.getSecurityPolicy(endpoint)}

Related