Forms are the way to get in touch with a company via the web. And we’re not just talking about contact forms. Forms are used to process orders, request brochures or white papers, manage event registrations, newsletter subscriptions, competitions, polls, etc.
Spotler offers the marketing professional a user-friendly drag & drop editor you can use to create smart forms and surveys in no time at all. With this editor you don’t need any technical know-how to use advanced features such as prefilling fields using contact data, personalization, conditional questions (branching), multi-paging, Thank You messages, form transcripts, the “Event Planner”, auto-response mails, separate webpagess, and much more.
There are several integration options for Spotler forms and surveys. Don't use the Rest-Api for integrating forms. Then read the article: Exporting and integrating forms.
Retrieving available forms
When integrating web forms via the API, it is convenient to display a list of the available forms in the CMS. This way, the website administrator can easily insert a form on a page. The retrieved forms could, for instance, be presented to the administrator in a pulldown menu in the CMS backend.
Get all forms
Retrieving a form
The CMS can use a method to retrieve (the HTML and scripts of) a Spotler form the moment a visitor accesses the page via the website.
When retrieving a form it is necessary to include where the form should be POSTed to (the “ACTION” attribute of the <FORM> tag). This is because the CMS itself must record the form submit. In addition, you can also indicate in which format you wish to retrieve the form (HTML or XHTML, and tables or divs). The API will return the HTML and scripts in the response.
Get a form
Retrieving prefilled forms
If the CMS already contains the customer’s data, you can use this data to prefill forms for this customer. The CMS can use a method to retrieve (the HTML and scripts of) a prefilled Spotler form the moment a visitor accesses the page. In the call, the CMS should mention the values that need to be prefilled.
When retrieving a prefilled form it is also necessary to include where the form should be POSTed to (the “ACTION” attribute of the <FORM> tag). In addition, you can also indicate in which format you wish to retrieve the form (HTML or XHTML, and tables or divs). The API will return the HTML and scripts in the response.
Get a prefilled form
Saving a form
When a respondent has filled out a form, the CMS will communicate the entered values to Spotler. This way, the values entered on the form can be saved in Spotler. The entered values are only communicated to Spotler once the CMS has recorded these values.
A Spotler form can also consist of multiple pages. In this case, the CMS must pass on the entered values when the visitor jumps to the next page (or back to the previous page).
The API gives the HTML of the next page (or the previous one), the Thank You page, or the current page (in case of an error) as the response. The response will show whether the form has been completed, so that the CMS can decide what is to be done with it. If an external Thank You page is displayed instead of a Spotler Thank You page, the API will not give the HTML of the next, previous, or Thank You page.
Save a form (page)
Retrieving form response
It is also possible to retrieve all the response generated by a form in order to compile a report or to create follow-up campaigns. This process is described in the section Retrieving reports.
Standard plugin for WordPress
If you are using WordPress as your CMS, you will not have to develop your own plugin to integrate Spotler forms and surveys. Spotler has already developed this plugin for you. Using our plugin, you can place forms on pages and in posts in WordPress. Even if you are using a different CMS, the WordPress plugin may still be of interest to you, because you can use the PHP-code as a code template. You can download this free plugin at wordpress.org.