Hello everyone I started digging into Yii a few months ago and I found this situation I’m not very sure how to deal with:
I have a product list where users add products dynamically. I want the user to fill in the information for product1, then press ‘Add product to list’, then fill in product2, … and so on. Each product is made of 3 or 4 autocomplete fields so that when the user starts typing… let’s say… the product’s name, the system suggests the name. I use CAutoComplete for this.
The thing is… this works fine with one record, but when I add another record at the end of the list, its autocomplete fields do not work.
I tried to add records by just copying the first record’s html code (<tr>…</tr>), and pasting it at the end of the list using jQuery. But then I figured out that I was missing each autocomplete’s javascript code and also that some id conflicts had to arise for sure.
So, any ideas for dynamically adding autocomplete records to a list?
Any help will be appreciated