Socket
Book a DemoInstallSign in
Socket

active-campaign-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active-campaign-react

Library that helps integrating Active Campaign Forms with React

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

Active Campaign React

Library that helps integrating Active Campaign Forms with React, based on the article - Better Way To Embed Active Campaign Forms Into React by Sara Gibbons



Installation

$ npm i --save active-campaign-react

# or

$ yarn add active-campaign-react

Example usage with react-hook-form

import { ActiveCampaignInputs, handleActiveCampaignSubmit } from 'active-campaign-react'
import { useForm } from 'react-hook-form'

export default function ContactForm() {
  const { register, handleSubmit } = useForm()
  const formId = 'yourFormId'

  const onSubmit = async (data) => {
    handleActiveCampaignSubmit(data, 'yourComapnySubdomain', formId)
  }

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <ActiveCampaignInputs formId={formId} />

      <input name="name" id="name" {...register('name', { required: true })} />
      <input name="email" type="email" id="email" {...register('email', { required: true })} />

      <button type="submit">Submit</button>
    </form>
  )
}

Keywords

activecampaign

FAQs

Package last updated on 26 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.