One form with Dynamic number of elements

I need some advice on the best way to approach the following:

I have a customer model with basic form details.

On that form there is a number of people dropdown which should then dymanically create additional people forms (with ajax call).

So if customer 1 selects 3 from number of people I then have 3 sub-form elements (based on additional customer model)

Any suggestions?

please ignore I found my solution…

sorry.

http://www.yiiframework.com/doc/guide/1.1/en/form.table

Also take a look at this wiki and this extension.