With the SmartForm API, forms can be implemented very quickly and easily into an existing website very quickly. You can find detailed information about the SmartForm API you can find in the article "SmartForms API (REST)".
The following is a step-by-step explanation of how to implement forms using the SmartForm API can be implemented into a website.
Note:
The SmartForms API is currently still a beta. Under certain circumstances minor errors may occur.
Step 1 - Create form
First, of course, you need an Evalanche form with a few fields. If you need assistance here, the following articles will help you:
It is also important that in the configuration of the form. check the "Enable form API" checkbox and specify the domain of your website. (without http/https) in the "Allowed domains" field.
Step 2 - Download SmartForm example
The SmartForms API requires a javascript that renders the form on the the website. You can download the javascript example here download and you can find a sample HTML code for the integration here.
Step 3 - Configure SmartForm
Before you embed the SmartForms example on your website, you just need to make a make one more small adjustment to the code<
In the javascript code, you will see the comments/notes in the appropriate places. The "formId" and the "interfaceDomain" are mandatory to store. The "formId", or the "sid" can be found in the Evalanche form object. Navigate to the "Integration" tab. At the very top you will find the box "Direct URL to this object" with a URL. This URL contains the "sid" at the very end.
Copy and paste this ID in the javascript.
const formId = "ef3xx.xyo4zcx";
The InterfaceDomain corresponds to the URL through which you call Evalanche. The can be, for example, scnem.com or scnem2.com.
const interfaceDomain = "scnem.com";
Following this, you can integrate the JavaScript into the website, as in this example: HTML example.
Step 4 - Implement SmartForm
Finally, all that is left to do on the respective web page is to add a DIV with the ID "form_container" must be inserted. Inside this DIV the form will be rendered by the script.
<div id="form_container"></div>
Note:
The SmartForms API is currently still a beta. Under certain circumstances minor errors may occur. For more info on SmartForms, see the post "SmartForms API (REST)".