Forms

Blocs allows you to easily integrate forms into your projects using the various form Brics available.

Setting up a form

Forms in Blocs require a little configuration before they will work as expected. To begin setting up a form first select the main form container, this will be easiest using the layer tree.

form-hover

You will now be presented with the form options on the sidebar menu. The two main sections that require attention are the Sendto and From input fields. In the Sendto field, enter the email address you would like the forms data sent to and in the From field, enter the email address you would like the form to be posted via (this data will show in your email client as sent from). With these options set correctly the form should operate as desired after your project is exported as long as the site is hosted on a web server that supports PHP.

As well as the Sendto and From input fields, there is also another field labelled Subject, use this input field to set the subject line for the emails that will be sent from this form.


 

Form Events

From the form options you can also set the success interaction and the fail message for the selected form. The success interaction is triggered if the form is successfully posted and the fail message is shown if there is a problem that prevents the form from posting.

The success interactions offer three options that can be triggered when a form is successfully posted. The first and most basic is to show a success message on the same page, the second is to go to a specific page in your Blocs project and the third is to go to a specific URL.


 

Important

Although Blocs creates all of the required PHP server side code to process and post forms, remember form posting will not work when your site is run from a computer desktop. Forms will only be processed and sent when hosted on a web server with PHP support.

Trouble Shooting

If your form is not sending, first check your spam folder at your receiving email address in case the emails have been moved there accidentally by the email client. Also check your Blocs project to confirm that all of the Bric items within the form such as text fields, radios and checkboxes have unique ID’s set. Finally, check that the server you are running your site from supports PHP.

If the problem persists, contact support here.

Updated on 26th November 2018

Was this article helpful?

Related Articles