Hi,
Kinda hard to explain this but will give a shot :)
I have a form... let's say it's about address. we have
'address_street' and 'address_block' fields in there.
I want on the page to be able to add arbitrary number of addresses.
So when building the form I get something like these input field names
in the finally generated form.
address[1][address_street] address[1][address_block] - link
to add_more/remove
address[2][address_street] address[2][address_block] - link
to add_more/remove
I want to uze Zend_Form component so I can benefit of showing error
messages, prefill, validate etc.
So issues I have are:
1. How do I build that form in first place - Was thinking of some way
of using Sub_Form but not really sure
2. How do I validate those thingies.. and show errors for each correct
block.
3. This is dynamic..can be N number of such forms.
I was thinking of using a form to which I assign N number of Sub_Form
each of which contains address_street and address_block fields
but not really sure how exactly to make it finally render like
described.
Any help is very welcome.