AJAX
ss:ajax:delayedload ss:ajax:event ss:ajax:region
Data
ss:data:calendar ss:data:column ss:data:postrepeater ss:data:productbrandrepeater ss:data:productcategoryrepeater ss:data:productrepeater ss:data:repeater ss:data:table ss:data:template ss:data:tree
Forms
ss:forms:address ss:forms:captcha ss:forms:checkbox ss:forms:checkboxgroup ss:forms:codeeditor ss:forms:combobox ss:forms:datepicker ss:forms:dialogbox ss:forms:editbox ss:forms:fileupload ss:forms:form ss:forms:hidden ss:forms:money ss:forms:officeuseregion ss:forms:option ss:forms:password ss:forms:paymentmethod ss:forms:radiobutton ss:forms:radiobuttongroup ss:forms:row ss:forms:searchbox ss:forms:signature ss:forms:slider ss:forms:spinbox ss:forms:submitbutton ss:forms:submitimage ss:forms:submitlink ss:forms:successcontent ss:forms:textarea ss:forms:timepicker
Layout
ss:layout:gallery ss:layout:productgallery ss:layout:rotator ss:layout:stepper ss:layout:stepperpanel ss:layout:tablist ss:layout:tablistitem
Logic
ss:logic:dependency ss:logic:parse ss:logic:if ss:logic:else ss:logic:include ss:logic:variable
Navigation
ss:navigation:breadcrumbs ss:navigation:item ss:navigation:primary ss:navigation:secondary
Standard
ss:standard:audio ss:standard:embed ss:standard:icon ss:standard:image ss:standard:link ss:standard:script ss:standard:tooltip ss:standard:video
Templates
ss:templates:button ss:templates:card ss:templates:column ss:templates:fancybox ss:templates:faq ss:templates:flexlayout ss:templates:header ss:templates:row ss:templates:section ss:templates:teammember ss:templates:testimonial
Regions
ss:regions:content ss:regions:contentadditional ss:regions:security ss:regions:togglable
Third Party
ss:thirdparty:googlemap ss:thirdparty:googlemapmarker
Attributes
Examples

<ss:forms:form> </...>

Creates a HTML form with many additional options for handling its submission.

Related Tutorials

Content

any
Usually contains <ss:forms:row> elements, containing each form item.

Attributes

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
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.
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 or not 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

Examples

Simple Form Elements

shows how to construct a basic form

HTML:


Run Example

Contact Form

Note: Please see the Tutorials links at the bottom of this page.

HTML:

Complicated Form Example

Illistrates in depth, the user of forms

HTML:

Onsubmitserver

Execute a custom PHP function with the form values

HTML:

PHP: