I have 10 pages and on each page I need to create a form. All 10 forms with the same design. Fields in different forms differ from each other, but can also be the same (id, name, phone number, email, etc.). I thought it was impractical to create 10 different forms. I came up with 2 solutions:
- Put the form fields into the array of objects, and render the fields depending on the array data in one general form.
- Make 10 different forms, but bring common fields (phone, email, etc.) into separate components.
Which of these solutions would be more correct? Or maybe there is an better solution?
Aucun commentaire:
Enregistrer un commentaire