All Projects → julianocomg → React Native Form

julianocomg / React Native Form

Licence: mit
A simple react-native component to wrap your form fields and get their values with just one single method.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Form

Jafar
🌟!(Just another form application renderer)
Stars: ✭ 107 (-26.71%)
Mutual labels:  form
Vue Form Components
Clean & minimal vue form elements and form builder with validation
Stars: ✭ 120 (-17.81%)
Mutual labels:  form
Avue
Avue.js2.0是基于现有的element-ui库进行的二次封装,简化一些繁琐的操作,核心理念为数据驱动视图,主要的组件库针对table表格和form表单场景,同时衍生出更多企业常用的组件,达到高复用,容易维护和扩展的框架,同时内置了丰富了数据展示组件,让开发变得更加容易
Stars: ✭ 1,789 (+1125.34%)
Mutual labels:  form
Webapiclient
An open source project based on the HttpClient. You only need to define the c# interface and modify the related features to invoke the client library of the remote http interface asynchronously.
Stars: ✭ 1,618 (+1008.22%)
Mutual labels:  form
Form For
ReactJS forms made easy
Stars: ✭ 118 (-19.18%)
Mutual labels:  form
Edit In Place
A flexible and unopinionated edit in place library for Angular applications
Stars: ✭ 123 (-15.75%)
Mutual labels:  form
Framy Css
Very simple CSS Framework
Stars: ✭ 103 (-29.45%)
Mutual labels:  form
Antd Schema Form
Based on Ant Design, interactive forms can be generated through JSON Schema configuration. - 基于Ant Design,可以通过JSON Schema配置生成可交互的表单。
Stars: ✭ 137 (-6.16%)
Mutual labels:  form
Vue Formulate
⚡️ The easiest way to build forms with Vue.
Stars: ✭ 1,947 (+1233.56%)
Mutual labels:  form
Form Validation.js
The most customizable validation framework for JavaScript.
Stars: ✭ 127 (-13.01%)
Mutual labels:  form
Bootstrap Validate
A simple Form Validation Library for Bootstrap 3 and Bootstrap 4 not depending on jQuery.
Stars: ✭ 112 (-23.29%)
Mutual labels:  form
React Form With Constraints
Simple form validation for React
Stars: ✭ 117 (-19.86%)
Mutual labels:  form
Ratifier
Ratifier is a form validation library for Android.
Stars: ✭ 123 (-15.75%)
Mutual labels:  form
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (-26.03%)
Mutual labels:  form
Forms
📝 Simple form & survey app for Nextcloud
Stars: ✭ 127 (-13.01%)
Mutual labels:  form
Formcat
A simple and easy way to control forms in React using the React Context API
Stars: ✭ 106 (-27.4%)
Mutual labels:  form
React Controlled Form
Flexible, Modular & Controlled Forms for React and Redux
Stars: ✭ 121 (-17.12%)
Mutual labels:  form
Convform
A jQuery plugin that transforms a form into an interactive chat.
Stars: ✭ 141 (-3.42%)
Mutual labels:  form
Reactive forms
This is a model-driven approach to handling form inputs and validations, heavily inspired in Angular's Reactive Forms
Stars: ✭ 135 (-7.53%)
Mutual labels:  form
Fonk
Form schema validation library
Stars: ✭ 125 (-14.38%)
Mutual labels:  form

react-native-form

A simple react-native component to wrap your form fields and get their values without attaching listeners everywhere.

Installation

npm install --save react-native-form

Usage

Just put your fields inside the form, with 2 props:

name => Your key to retrieve the value (required)

type => The field type (required)

key => Required for fields with the same name

import Form from 'react-native-form'

<Form ref="form">
  <View>
    <View>
      <TextInput type="TextInput" name="myTextInput" /> // Yes, it doesn't matter how deep they are :)
    </View>
  </View>
  
  <Switch type="Switch" name="mySwitch" />
  <Slider type="Slider" name="mySlider" />
  <DatePickerIOS type="DatePickerIOS" name="myBirthday" />
  <Picker type="Picker" name="myPicker" />
  
  <PickerIOS type="PickerIOS" name="pickers[ios]" /> // Yes, we support form serialization, like the web
</Form>

And then you can call ***this.refs.form.getValues()***. You will get an object with all the values serialized. Simple as that.

Do you want to use custom fields?

Just pass the prop customFields to the form. Check out the example below using the react-native-radio-buttons field:

var customFields = {
  'RadioButtons': {
    controlled: true,
    valueProp: 'selectedOption',
    callbackProp: 'onSelection',
  }
}

<Form ref="form" customFields={customFields}>
  <RadioButtons type="RadioButtons" name="radioButtons" />
</Form>

Support for Accordion

If you have form fields under an Accordion component, add:

type="Accordion"

to the Accordion component to have Form include the Accordion children.

License

react-native-form is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].