iway1 / react-ts-form

https://react-ts-form.com
MIT License
2.01k stars 33 forks source link

On the Fly adding additional fields to a form #128

Closed roborobs1023 closed 12 months ago

roborobs1023 commented 1 year ago

Describe the feature you'd like to see added

Is it possible to generate fields on the fly based on user input?

For instance allowing a user to create a custom form within the frontend of the application.

User selects a field type, enters the name for the field, requirements etc. and the form is generated and in turn displayed on the screen.

I know you can the same type of field to form dynamically but can you add user specified fields?

roborobs1023 commented 12 months ago

Any idea on this?

roborobs1023 commented 12 months ago

I was able to get it to work using Record<string, any> type from zod.