1.0.2 • Published 2 years ago

react-native-lead-form v1.0.2

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

Lead form for React Native

npm

First you need to create an account with Boontar TV

Features

  • You can use your own style classes
  • Install the module and start collecting requests, ratings, reviews
  • Admin panel for viewing incoming requests Boontar TV
  • Export requests
  • Embedded analytics

Admin panel

List of incoming requests in the admin panel Boontar TV

Boontar TV - Lead Form Builder

Getting Started

  1. Create a key without site URL on the admin panel
  2. Install the module, run the following in the command line:
npm i react-native-lead-form --save

Use within your application with the following line of JavaScript:

import LeadForm from 'react-native-lead-form'

Available props

NameTypeRequiredDefaultDescription
getIdnumberYes-Lead form unique ID at Boontar TV
apiKeystringYes-Key that you generate in the admin panel Boontar TV
inputLabelstringNo-Custom style for InputLabel
inputstringNo-Custom style for inputs
submitButtonstringNo-Custom style for button
submitButtonTextstringNo-Custom style for text in submit button
successTextstringNo-Custom style for success notification
failedTextstringNo-Custom style for failed notification
containerstringNo-Custom style for main container
titlestringNo-Custom style for title
descstringNo-Custom style for description
inputsContainerstringNo-Custom style for form container
buttonContainerstringNo-Custom style for button and notification block
placeholderTextColorstringNo-Custom text color for placeholder in inputs
statusVisiblebooleanYestrueShow form submission status
successStatusstringNoForm sent successfullyText on success
failedStatusstringNoFailed to submit formText on failed
requiredStatusstringNoYou have not filled in the required fieldsText if all required fields were not filled
validateStatusstringNoCheck the correctness of the filled dataText if email or phone types fail validation
onSuccessfuncNo-Callback function after successful form submission
onFailedfuncNo-Callback function after failed form submission
onLoadfuncNo-Callback function after the lead form is loaded
onLoadFailedfuncNo-Callback function if lead form fails to get

Error codes

CodeDescription
1Failed to submit form
2Required fields not filled
3Not correct email
4Not correct phone number

Available input fields

NameIncluded
Text
Number
Date & Time
Date
Time
Slider
Select

Example

import React, { Component } from 'react';
import { SafeAreaView } from 'react-native';

import LeadForm from 'react-native-lead-form'

class HelloWorld extends Component {
  onSuccess = () => {

  }

  onFailed = (errorCode) => {
    console.log(errorCode)
  }

  render() {
    return (
      <SafeAreaView>
        <LeadForm
          getId= {489}
          apiKey = {'3eed5899edebff1197ae59dc06651ff929a10297'}
          statusVisible = {true}
          onSuccess = {()=> { }
          }
          onFailed = {(errorCode)=>{ }}
        />
      </SafeAreaView>
    );
  }
}