Legacy
Post data to a form
How to submit answers to an eMarketeer form programmatically from your own website or an external system.
Last updated
Was this helpful?
How to submit answers to an eMarketeer form programmatically from your own website or an external system.
This article applies to Form (Legacy). For the current form editor, see Forms.
This guide shows how to post answers to an eMarketeer form from your own website or from another system.
The hosted version of a form covers many cases, but sometimes you need to embed the form on your website or trigger automations from another system. A form is a flexible target for posting data from outside eMarketeer.
You always need to create the form in eMarketeer first. The form defines which questions you want answered. Once it exists, you can post answers to it in several ways:
Get the direct URL and let visitors answer the hosted form (not covered here).
Iframe the hosted form onto your site (not covered here).
Put the HTML of the form on your website.
Use a script to post data to the form programmatically.
Every form has two important properties:
A URL to post the data to.
Input fields with a name and a value.
If you POST (or GET) the answers to that URL with the right name/value pairs, your answers are saved in eMarketeer.
In eMarketeer, create a form with a contact registration and any other questions you need.

Click "publish" on the form.
.png>)
Then click "Website integration."

Click "GET CODE" under the <FORM> section to open the form code. If reCAPTCHA is active on your account, add a domain to the domain field before you can access the code.

The form code is displayed.

You can paste this code directly on your website. It posts the answers to eMarketeer and then shows the thank-you page.
You can restyle and rearrange the code as much as you want — as long as you keep the action URL and the input names intact. There is also a hidden input named "m" with a value that identifies which form to post to. Keep it.
Once you have the URL and the input fields, any method that posts to that URL works. Instead of using a browser, you can use cURL or a similar tool to post programmatically. Keep the input names intact. GET is also valid — pass the parameters in the query string.
If you embed the form on your site, you may want to send visitors to your own thank-you page instead of the eMarketeer-hosted one. To change the redirect, edit the form in eMarketeer and click "Thank you page." Choose "Use custom URL" and enter the URL to redirect to.

Last updated
Was this helpful?
Was this helpful?

