formchimp v1.0.0-beta.1
Form Chimp API Lib
A tiny library for interacting with the Form Chimp API. This is an optional companion to your Form Chimp tooling. An alternitive would be using Axios HTTPS.
Form Chimp is a platform that makes working with web forms easiar by handling the back-end and allowing you to define the front-end yourself. So if you decide to impliment your form using Js...this lib is here to help with that. Enjoy - Anas M.
How to...
1 - Add the lib to your project.
Using npm
install the lib to your project with the below command.
npm i formchimp
Then, import it to your project like so...
import Chimp from 'formchimp'
<script src="https://cdn.jsdelivr.net/npm/formchimp/lib/build.js"></script>
2 - Submit to form
- Initialize the
Chimp
object with your form'sid
.
let myForm = new Chimp(form_ID)
- Once you want to submit to your form...just call the post method on the
Chimp
object.
myForm.post(data_Object)
.then((successMassage)=>{
console.log(successMassage);
})
.catch((err)=>{
console.log(err);
})
Once the post
method is called, the lib will make an API call to your form using your form's ID that you've provided...Submitting the data to your form.
That's all for now...Thank you. ©2022 Form Chimp and it's creators. View Licence
2 years ago
2 years ago