bietkul / react-native-form-builder

Handle your forms in a smart way
MIT License
121 stars 68 forks source link

How to add multiple level nesting #29

Open Ivona221 opened 5 years ago

Ivona221 commented 5 years ago

I am trying to do a multiple level nesting meaning i want to add a group element inside another group element. However i get the following error: screenshot_5

The thing i am trying to do is :

const fields = [ { type: 'group', name: 'address', label: 'Address', fields: [ { type: 'group', name: 'Address2', label: 'Address2', fields:[ { type: 'text', name: 'Name', label: 'Name', }, ] }, { type: 'picker', name: 'country', label: 'Country', defaultValue: 'INDIA', options: ['US', 'INDIA', 'UK', 'CHINA', 'FRANCE'], }, ], }, { type: 'text', name: 'user_name', required: true, icon: 'ios-person', label: 'Username', }, ];

bietkul commented 5 years ago

Can you tell me which version you're using, if on latest then can try with 1.0.15.

Ivona221 commented 5 years ago

I was using version 1.0.16. I also tried with 1.0.15 but i get the same error.

bietkul commented 5 years ago

Multilevel nesting is not supported by this library, you can try react-reactive-form to achieve it.