ModelForms module

FormSubmission

A model in the Forms module, with 16 members for templates, 17 API properties and 18 members for admin templates.

View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 16

Take no arguments.

# getId()
?int
# getToken()
?string
# getCompleted()
?DateTime
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getSite()
?Site
# getRevision()
?FormRevision
# getForm()
?Form
# getCreatedBy()
?User
# getModifiedBy()
?User
# getStepSubmissions()
?Collection<StepSubmission>
# getElementSubmissions()
?Collection<ElementSubmission>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getRedirectData() Templates only
array
Gets array data for submitted elements to use it for GET redirection. It could be used for creating URL with submitted elements. Method does not check if redirecting for the form is allowed, it only provides required data.

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 17

Read-only values on the record.

# showUrl Not in Templates
?string
Get the url for exporting a pdf for the record.
# deleteUrl Not in Templates
?string
Get the url for deleting the record.
# id
?int
# token
?string
# completed
?DateTime
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.
# site
?Site
# revision
?FormRevision
# form
?Form
# createdBy
?User
# modifiedBy
?User
# stepSubmissions
?Collection<StepSubmission>
# elementSubmissions
?Collection<ElementSubmission>
# data API & Jobs only
array
Gets data by key => value for every submitted element of this form. Value could be either a string or an array.
# result API & Jobs only
array
Retrieves the result of the form submission based on the active revision's settings. This function processes the form's submission action and returns the appropriate result. It handles two actions: 1. If the action is 'showResultStep', it gathers all the text elements from the result steps. 2. Otherwise, it returns a redirection URL if configured.

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 18

Take no arguments.

# getShowUrl() Not in Templates
?string
Get the url for exporting a pdf for the record.
# getDeleteUrl() Not in Templates
?string
Get the url for deleting the record.
# getId()
?int
# getToken()
?string
# getCompleted()
?DateTime
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getSite()
?Site
# getRevision()
?FormRevision
# getForm()
?Form
# getCreatedBy()
?User
# getModifiedBy()
?User
# getStepSubmissions()
?Collection<StepSubmission>
# getElementSubmissions()
?Collection<ElementSubmission>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned