Socket
Book a DemoInstallSign in
Socket

@halo-lab/solid-form-getform-io

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@halo-lab/solid-form-getform-io

Solid.js custom form integration with the getform.io service

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

@halo-lab/solid-form-getform-io

This is a form component built with Solid.js that allows you to easily create a form that submits data to a GetForm endpoint. The form has three fields: name (input type="text"), email (input type="email"), and message (textarea). You can choose which fields to display by passing props to the component.

Installation

You can install the package using npm:

npm install @halo-lab/solid-form-getform-io

Usage

To use the form component, you need to import it into your Solid.js application:

import Form from '@halo-lab/solid-form-getform-io';

You can then use the component in your application:

<Form getFormID="your-getform-id" />

You need to provide your GetFormID as the getFormID prop.

By default, all three fields (name, email, and message) will be displayed in the form. If you want to display only specific fields, you can use the showName, showEmail, and showMessage props:

Props

The following props are available for the form component:

  • getFormID (required): Your GetFormID.
  • showName (optional, default true): Whether to show the name field.
  • showEmail (optional, default true): Whether to show the email field.
  • showMessage (optional, default true): Whether to show the message field.
  • onFormSubmit(optional, default null): Function that is executed when the form is submitted

Example

Here's an example of how to use the form component:

import Form from '@halo-lab/solid-form-getform-io';

const App = () => {
  
  function onFormSubmit() {
    console.log("Form submitted!");
  }

  return (
    <Form
      getFormID="https://getform.io/f/your-getform-id"
      showName={true}
      showEmail={true}
      showMessage={false}
      onFormSubmit={onFormSubmit}
    />
  );
}

Word from the author

Have fun ✌️

Supported by Halo lab

Keywords

solid-js

FAQs

Package last updated on 24 Mar 2023

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.