Hello,
I need to build a form where one ORDER has many MEMBERS. This means the parent form has a set of fields, but there is also a dynamic part of the form where the nested model, MEMBERS,
ORDER
Order number
Email
Order date The nested model's fields follow
Member details 1
-- Name
-- Date of birth
-- Nationality
Member details 2
-- Name
-- Date of birth
-- Nationality
Member details 3...
and so on...
So my question is, can I use the Fieldset class to generate more than one instance of the same form fields at a time, and validate them on submit, and repopulate all form fields on submit/edit?
I hope this question makes sense (I have a feeling this isn't very clear). Basically, I did this in Rails by following this tutorial: http://railscasts.com/episodes/197-nested-model-form-part-2
But I'd like to do this in Fuelphp. Any help appreciated.
Thanks,
Matt
I don't think this is the right way to approach this.
If you're using ORM, it is better to use the built-in validation feature of the ORM model, and just validate every model instance individually.