yii-joblo / multimodelform

Yii extension multimodelform
13 stars 9 forks source link

Select2 widget incompatibility #16

Open vercotux opened 9 years ago

vercotux commented 9 years ago

The Select2 widget does not work correctly when cloned. For example the template takes all events no matter which clone is clicked.

yii-joblo commented 9 years ago

This is a common problem of all widget using jquery. After cloning a widget clientside the new element must be reintialized with the jquery method or other js-code.

There are only a few elements like datepicker, datetimepicker ...supported. See the docs and the afterNewIdX methods: afterNewIdDatePicker, ... Maybe someone can figure out the js-code for Select2