Change elements names dynamically

Hello Everyone…

I am new to Yii. My requirement is that i have created widget for adding addresses. Over there i have written jquery clone method for cloning the address div.

My requirement is when clone the address div, it will add the counter in front of label i.e Address 1, Address 2…

But in my model class i have set attribute label for address. So how can i manage it in Yii?

Thanks in advanc

You could have a model "Address" and have a HAS_MANY relation. Thus rendering and validating will also not be a problem.

Moreover, Address 1 & Address 2 & so on can be generated by keeping a counter.