{"id":4493,"url":"https://github.com/julianocomg/react-native-form","last_synced_at":"2025-08-04T01:32:32.828Z","repository":{"id":57337113,"uuid":"44326740","full_name":"julianocomg/react-native-form","owner":"julianocomg","description":"A simple react-native component to wrap your form fields and get their values with just one single method.","archived":false,"fork":false,"pushed_at":"2018-09-26T15:39:46.000Z","size":28,"stargazers_count":146,"open_issues_count":3,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-02T01:12:12.810Z","etag":null,"topics":["android","form","ios","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-form","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julianocomg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-15T15:24:21.000Z","updated_at":"2024-03-21T10:49:10.000Z","dependencies_parsed_at":"2022-09-12T13:42:49.287Z","dependency_job_id":null,"html_url":"https://github.com/julianocomg/react-native-form","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianocomg%2Freact-native-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianocomg%2Freact-native-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianocomg%2Freact-native-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianocomg%2Freact-native-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianocomg","download_url":"https://codeload.github.com/julianocomg/react-native-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228582487,"owners_count":17940587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","form","ios","react-native"],"created_at":"2024-01-05T20:17:14.272Z","updated_at":"2024-12-07T08:30:40.894Z","avatar_url":"https://github.com/julianocomg.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["Forms","UI"],"readme":"# react-native-form\nA simple react-native component to wrap your form fields and get their values without attaching listeners everywhere.\n\n## Installation\n```\nnpm install --save react-native-form\n```\n\n## Usage\nJust put your fields inside the form, with 2 props: \n\n***`name`*** =\u003e Your key to retrieve the value (required)\n\n***`type`*** =\u003e The field type (required)\n\n***`key`*** =\u003e Required for fields with the same name\n\n\n```javascript\nimport Form from 'react-native-form'\n\n\u003cForm ref=\"form\"\u003e\n  \u003cView\u003e\n    \u003cView\u003e\n      \u003cTextInput type=\"TextInput\" name=\"myTextInput\" /\u003e // Yes, it doesn't matter how deep they are :)\n    \u003c/View\u003e\n  \u003c/View\u003e\n  \n  \u003cSwitch type=\"Switch\" name=\"mySwitch\" /\u003e\n  \u003cSlider type=\"Slider\" name=\"mySlider\" /\u003e\n  \u003cDatePickerIOS type=\"DatePickerIOS\" name=\"myBirthday\" /\u003e\n  \u003cPicker type=\"Picker\" name=\"myPicker\" /\u003e\n  \n  \u003cPickerIOS type=\"PickerIOS\" name=\"pickers[ios]\" /\u003e // Yes, we support form serialization, like the web\n\u003c/Form\u003e\n```\n\nAnd then you can call ***`this.refs.form.getValues()`***. \nYou will get an object with all the values serialized. Simple as that.\n\n## Do you want to use custom fields?\n\nJust pass the prop ***`customFields`*** to the form. Check out the example below using the [react-native-radio-buttons](https://github.com/ArnaudRinquin/react-native-radio-buttons) field:\n\n```javascript\nvar customFields = {\n  'RadioButtons': {\n    controlled: true,\n    valueProp: 'selectedOption',\n    callbackProp: 'onSelection',\n  }\n}\n\n\u003cForm ref=\"form\" customFields={customFields}\u003e\n  \u003cRadioButtons type=\"RadioButtons\" name=\"radioButtons\" /\u003e\n\u003c/Form\u003e\n```\n\n## Support for Accordion\n\nIf you have form fields under an Accordion component, add:\n\n```javascript\ntype=\"Accordion\"\n```\n\nto the Accordion component to have Form include the Accordion children.\n\n\n## License\nreact-native-form is licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianocomg%2Freact-native-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianocomg%2Freact-native-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianocomg%2Freact-native-form/lists"}