1.0.0-beta.1 • Published 2 years ago

formchimp v1.0.0-beta.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

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

  1. Initialize the Chimp object with your form's id.
let myForm = new Chimp(form_ID)
  1. 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

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago