Creates a HTML form with many additional options for handling its submission.
action
string
The URL the form will submit to. By default, forms submit to the current page and this is the appropriate behaviour most of the time. If another page is specified here, the form will submit (and the client will navigate to) the new page. Submitting to other pages may disrupt Oncord's ability to handle the form. Default = "".
component
string
Linked component for getting and saving values
componentKey
bool
Sets the key for the component
contactGroupAdd
string
Add the contact identified by the form submission into 1 or more groups.
Contacts can be identified by a name and email address. Multiple groups can be listed separated by commas (,).
contactGroupRemove
string
Remove the contact identified by the form submission from 1 or more groups.
Contacts can be identified by a name and email address. Multiple groups can be listed separated by commas (,).
contactMode
string
Different ways to handle any Contact database fields included in the form.
Default value =
no handling. Possible values:
- "store"
Creates a new contact if they do not exist, but doesn't fail validation if one does.
Use case: Contact forms, enquiry or quote forms. - "register"
Registers the contact and fails validation if the contact already exists.
Use case: New user registration form where the user sets a password. - "subscribe"
Ensures the user who fills this form is subscribed.
Use case: Newsletter subscription form. - "guest"
Creates a new contact if they do not exist, but does not ever log the user in.
Use case: A tradeshow survey form or a business owned iPad / tablet registration form. - "login"
Logs in the contact (requires contact_email and contact_password fields).
Use case: A login form. - "logout"
Logs out the contact.
Use case: Logout form. - "unsubscribe"
Unsubscribes the contact.
Use case: Unsubscribe form. Requires contact_email.
contactPrefill
string
If the current user is logged in, should the form be prefilled with their details. Default = true.
controlSSubmit
bool
If ControlSSubmit is true, the form will submit when Ctrl+S is pressed on the keyboard
disableCSRF
bool
Determines if CSRF should be disabled for the current form
disableSpamPrevention
bool
Determines if spam prevention should be disabled
encType
string
The form content encoding type
Different encoding types are required for uploading different types of data.
application/x-www-form-urlencoded
Form data is encoded as name/value pairs.
multipart/form-data
Form data is encoded as a message with a separate part for each control on the page.
text/plain
Form data is encoded in plain text, without any control or formatting characters.
id
string
(Required) Give this control a unique id. Can be accessed in the client DOM (eg, document.getElementById('myid') or in the server DOM using [? $myid ?] or [? $('myid') ?]).
leavePageWarning
bool
If a user modifies the contents of a form and navigates away without saving their changes, should a warning be displayed?
method
string
The form submit method
Set to 'get' to submit form item values through the GET query string
Set to 'post' to submit form item values through the POST http headers
Set to 'ajax' to submit form item values through an AJAX xhttprequest POST. Must contain
<forms:successcontents> within the form to show the sucess message.
noRefresh
bool
If no refresh is set to true, the form wont repost when refreshed
onSubmitEmail
string
If set, an email will be sent with the contents of the form to the specified email addresses. For example, a company can nominate an email address for customer feedback, and the Feedback form can email every submission to that address. Multiple address are separated by commas (,).
Using the value of true will send an email to the Contact E-mail specified in the Account Settings of the site.
onSubmitEmailAttachmentsMaxSize
string
If set, the attachments of an email cannot exceed the specified maximum size in MB
onSubmitEmailCallback
callable
When an email is sent via OnSubmitEmail you can call a custom PHP function specified the value of this attribute.
An instance of \Framework\Mail\Message will be passed as a parameter to your function prior to sending.
onSubmitEmailShowAdminLinks
bool
If true, the email sent to all addresses listed in onsubmitemail will have two links to the Oncord admin Dashboard Open Contact and View Submission. Default = true.
onSubmitEmailSubject
string
The subject of the email that will be sent to all addresses listed in onsubmitemail.
onSubmitRedirect
string
The URL to be redirected to upon successful form submission.
Set to true to refresh the page upon successful form submission.
Set to 'previous' to redirect to the previous page upon successful form submission.
onSuccessToastMessage
string
If set, a green notification containing the message will briefly appear in the top-right hand corner of the page for every client when they successfully submit the form.
recordSubmissions
bool
Whether to record submissions to this form. Form submissions are viewable on the Oncord Dashboard, and are also accessible by other system components such as Automation. Generally it's a good idea to enable for any non-trivial forms where users are submitting information, such as for a feedback form. Enabling for simple forms such as login forms and email sign-up forms is not recommended as they will clutter the form submission history for your site. Default = false.
saveState
bool
When set to true, the value of all child form items is persisted when the page is revisited
onSubmitServer
callable
Called when the form is submitted
onSubmitPrerenderServer
callable
Called when the form is submitted while the document is being constructed
onPostbackServer
callable
Called when the form is submitted, regardless of validation failure
onPopulateServer
callable
Called when the form is populating values