You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a bug with checkboxes in current version on cloning items.
As you know for each checkbox yii creates hidden input with default {value="0"} and the checkbox itself has default {value="1"}. So we have:
But after cloning all cloned items have both input values as {value}, they lose their default value and after that data aren't sent correctly to controller:
it works for me, but it is not the best solution I guess.
In fact it is not the widget bug but the jquery bug: http://bugs.jquery.com/ticket/10550
There is described that bug has place in IE but I faced it in Chrome too.
The text was updated successfully, but these errors were encountered:
I have found a bug with checkboxes in current version on cloning items.
As you know for each checkbox yii creates hidden input with default {value="0"} and the checkbox itself has default {value="1"}. So we have:
<input type="hidden" name="Tickets[0][class]" value="0">
<input type="checkbox" id="tickets-0-class" class="selectbox" name="Tickets[0][class]" value="1">
But after cloning all cloned items have both input values as {value}, they lose their default value and after that data aren't sent correctly to controller:
<input type="hidden" name="Tickets[0][class]" value>
<input type="checkbox" id="tickets-0-class" class="selectbox" name="Tickets[0][class]" value>
I managed to fix it in 'afterClone' event in this way:
it works for me, but it is not the best solution I guess.
In fact it is not the widget bug but the jquery bug:
http://bugs.jquery.com/ticket/10550
There is described that bug has place in IE but I faced it in Chrome too.
The text was updated successfully, but these errors were encountered: