1.0.1 • Published 5 years ago

gatsby-plugin-arengu-forms v1.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

Arengu Forms for Gatsby websites

This Gatsby plugin allows you to easily embed Arengu Forms into your Gatsby website.

Install

npm install --save gatsby-plugin-arengu-forms

Getting started

Add the Arengu Forms plugin to your gatsby-config.js file:

plugins: [`gatsby-plugin-arengu-forms`]

This plugin will load into your website our JavaScript SDK asynchronously, so it won’t affect your website load speed.

Usage

To use this plugin you have to import ArenguForm component and pass the required props.

Example of basic usage

import React from "react"
import { ArenguForm } from "gatsby-plugin-arengu-forms"

const IndexPage = () => (
  <div>
    <ArenguForm id="123456789" />
  </div>
)

export default IndexPage

Example of usage with hiddenFields prop

import React from "react"
import { ArenguForm } from "gatsby-plugin-arengu-forms"

const IndexPage = () => (
  <div>
    <ArenguForm
      id="123456789"
      hiddenFields={[
        {
          key: 'userId',
          value: '12345',
        },
        {
          key: 'source',
          value: 'anyString',
        },
      ]}
    />
  </div>
)

export default IndexPage

ArenguForm Props

proptypedescription
id (required)stringThe Form ID of your form. You can find it in your form settings or share page.
hiddenFields (optional)arrayArray of objects with key and value properties