There are several integration options for Spotler forms and surveys:
- Posting HTML from Spotler
- Placing a form on a Spotler web page
The third option is to place a form on a Spotler web page. This page is therefore separate from your website. This can be useful if you can't easily add a form in your CMS.
- Integrating forms via an API
There are a number of conditions to be able to integrate forms on an external web page:
- The form or survey may consist of one page
- It cannot contain a thank you page from the Forms module
- Only the type of form or survey: 'Subscribe' and 'Normal' work
Do you want to use a form or survey that consists of several pages? Then use a Spotler webpage.
To download the code for integrating a form, go to Integrate under the dropdown menu in the overview.
The next screen appears:
You can integrate the form in two ways:
With the dynamic option, the changes that take place in the form are immediately implemented on the website. This is not the case with a static form. After a change in Spotler you will have to insert the code again on your website.
By default, only the Dynamic integration method is selectable. This has to do with the fact that the anti-bot security of a form is on by default. This option is only available for dynamic forms. If you do not know which choice to make regarding the type of HTML, ask your web builder.
You also have the choice of code that is built with tables or without tables. In both cases you can completely style the form yourself. If you want to have complete freedom over the layout of the form, you can choose generation without tables.
Save and view code for integration form
When exporting the form files, choose where you want to save them on your computer. It is one zip file.
Then open the zip file. In the case of a dynamic form you will see two html files:
You need both. Open the html file in your browser by double clicking on the file or right-clicking on Open.
A white screen will open in your browser. You can find the code of the form by right-clicking on View source code/View page source.
You will then see the code that you can implement on your website. This method applies to both files.
Placing a form on a Spotler Web page
Drag a form or survey block onto the canvas of your web page via the Editor-options.
Double-click on the block and a dropdown menu will appear with the forms in your Spotler account.
The form will then be showed on your web page.
Form via an API
We have several technical documentation for using the REST API. If you want to get started with a REST API and forms, read more about Integrating forms under the API documentation.