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
see #215
Symptoms are the same. ( The Hidden field behind date control does not have an index number included in the field name ) Either the problem is back or it didn't really go away.
Possible temporary workaround is to add a hidden column to the TabularInput widget configuration which substitutes for the incorrectly named fields ...
Note however that the returned POST data will contain an extra "date" field ( containing a single date from the last row ) after the data[] array. This can be be removed in your controller code before updating the records.
$data = Yii::$app->request->post('Transaction', []);
$models = [];
foreach (array_keys($data) as $index) {
$models[$index] = new app\models\Transaction();
}
if (Model::loadMultiple($models, Yii::$app->request->post())) {
unset($models['date']);
if ( Model::validateMultiple($models)) {
foreach ($models as $model) {
$model->save(false);
}
}
[ Also want to say this is an awesome widget. Thanks to original author for all the hard work]
The text was updated successfully, but these errors were encountered:
@IvandaNothabeer thx for reporting an issue. according to a comment from the closed issue, the problem has been fixed. May be something changed in kartik's library and the original issue came back
Anyway somebody has to investigate it. The widget's code isn't complicated and probably this person can be you 😄
I didn't touch the widget's code and yii2 in general for a long time and TBH I'm a bit of out of context already
see #215
Symptoms are the same. ( The Hidden field behind date control does not have an index number included in the field name ) Either the problem is back or it didn't really go away.
Possible temporary workaround is to add a hidden column to the TabularInput widget configuration which substitutes for the incorrectly named fields ...
Note however that the returned POST data will contain an extra "date" field ( containing a single date from the last row ) after the data[] array. This can be be removed in your controller code before updating the records.
[ Also want to say this is an awesome widget. Thanks to original author for all the hard work]
The text was updated successfully, but these errors were encountered: