Implementing your form using JS is our recommended method.
When your form is being submitted in the front-end, a POST request is sent to our API with the data that’s being submitted.
Given this, you can make that POST request using something like Axios HTTP.
Here’s an example using Axios HTTP.
axios.post(`https://api.formchimp.app/?form=${FORM_ID}`, {massage:"hello World"})
.then(function (response) {
// handle successful submission of form.
console.log(response);
})
.catch(function (error) {
// handle error
console.log(error);
})
.then(function () {
// always executed
});
<aside>
⚠️ - Make sure your form is active.
If your form has fields defined, make sure the data
matches the fields. - Fields
</aside>
You can also use a tinny JS library we’ve created - FormChimpJS
For now, our JavaScript library does what the code above does but one benefit of using it is the potential features you’ll get in the future versions of it.