nf
native-forms
npm i native-forms
nf

native-forms

Build forms, surveys and polls for React Native apps.

by Tony Arrived

1.7.3 (see all)TypeScript:Not Found
npm i native-forms
Readme

NativeForms

Build forms, surveys & polls for React Native apps.

Why this product was created?

We created NativeForms to save you countless hours of boring development of forms. Create forms without coding and control them from the dashboard. Bring all the logic outside your app, so you can control forms even when your app is live.

Installation

npm install native-forms --save
// or
yarn add native-forms

Basic Usage

  1. Import component.
import NativeForms from 'native-forms';
  1. Render form on the screen.
<NativeForms form="https://form.nativeforms.com/I2Z5xWPmZic4JlRvpmNy0Db" />

Form is displayed natively and is not a webview. You can create your own forms here.

Basic flow of displaying NativeForms as Modal in your application.

import React, { useState } from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';
import { NativeFormsModal } from 'native-forms';

const App = () => {
  const [hasForm, showForm] = useState(false);
  return (
    <View style={styles.container}>
      <Button title="Show Form" onPress={() => showForm(true)} color="#20f" />
      <NativeFormsModal
        visible={hasForm}
        form="https://form.nativeforms.com/I2Z5xWPmZic4JlRvpmNy0Db"
        onClose={() => showForm(false)}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

export default App;

Replace form prop with your form's address. You can create your own forms here.

Demo

Demo

Props

NameTypeRequiredNote
formStringYesURL of form to display.
formJSONObjectNoYou can use JSON format of the form instead of form URL. You can get this format by clicking Export Form to JSON in dashboard.
onCloseFunctionNoCalled when user decides to close the form.
onSendFunctionNoCalled when user completes form.
emailStringNoEmail of person that will complete form (it will be displayed in the admin panel).
nameStringNoName of person that will complete form.
extraDataObjectNoExtra data fields that will be sent along with the completed form. This data will not be visible by users.

Support

In case of any questions or problems, please contact me at: hello@nativeforms.com

Happy Coding 💖

Downloads/wk

566

GitHub Stars

28

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
1.7.3
latest
10mos ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate