<ev:form>

Integrates with the internal Form Builder.

Attributes
action

This is the same as the standard HTML form tag and defaults to GET. You do not need to set this attribute when submitting to the same page you are on or when using the ref attribute to integrate with the Form Builder. 

method

This is the same as the standard HTML form tag and defaults to GET. You do not need to set the method attribute when using a Form Builder form as this is automatically set to POST.

name

Used for basic forms. If you are rendering a form from the Form Builder you do not need to set this attribute unless you are failing over to a basic form, in which case the name attribute must be set before the ref attribute.

Example:

<ev:form name="basic" />

In this example we're hooking into the basic form processor, which simply emails form submissions to the account owner (see more details below).

ref

Unlike menus, editable or translation regions the reference of the <ev:form> must currently be the system ID for the form in the Form Builder. It is inadvisable to hard-code your ID numbers. Instead, implementation of the form object should be done in conjunction with settings made available to Evance users within your templates.json file.

Example using a setting:

<ev:form ref="{{ page.settings.MYFORM }}" />

In this example the setting 'MYFORM' represents the ID number selected by the User. If the ID number does not exist as an ID for the Account, the form will not render and any content within the <ev:form>...</ev:form> will be rendered. This allows you to create alternative or failover content (see below). 



Adding failover form content

When creating a theme you have no idea what Forms any one account may have installed. So creating a Contact Us page with a form is problematic. However it is possible to create either failover content, or a very basic form for themes. 

Failover content

Adding failover content is only applicable when <ev:form> is used in conjunction with the Form Builder. 

<ev:form ref="{{ page.settings.MYFORM }}">
    <p>You have not yet added a form to this page.</p>
    <p>Select the form you wish to appear here in your page settings</p>
</ev:form>

Failover basic forms

More information about installing basic forms coming soon.

Note: Using basic forms is now discouraged and Form Builder should be used where possible. 

COVID-19 NOTICE – Business as Usual
Evance continues to provide all services and support throughout this difficult period. See our full statement here .