dev-master
9999999-devIt is a widget for melon.ng to clone form elements of related models.
BSD-3-Clause
The Requires
by tolik505
extension yii2 widget melon.ng
It is a widget for melon.ng to clone form elements of related models.
It is a widget only for melon.ng to clone form elements of related models., (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
composer require tolik505/yii2-related-form
or add, (*4)
"tolik505/yii2-related-form": "dev-master"
to the require section of your composer.json
file., (*5)
After CRUD generating add to getFormConfig(), (*6)
[ 'class' => tolik505\relatedForm\RelatedFormWidget::className(), 'relation' => 'tests', //name of relation /*'uploadBehavior' => [ //if needed UploadBehavior [ 'attribute' => 'file_id', 'extensions' => ['png', 'gif', 'jpg', 'jpeg', 'ico', 'svg'], 'required' => true ] ],*/ ]
$(".dynamicform_wrapper").on("beforeInsert", function(e, item) { console.log("beforeInsert"); }); $(".dynamicform_wrapper").on("afterInsert", function(e, item) { console.log("afterInsert"); }); $(".dynamicform_wrapper").on("beforeDelete", function(e, item) { if (! confirm("Are you sure you want to delete this item?")) { return false; } return true; }); $(".dynamicform_wrapper").on("afterDelete", function(e) { console.log("Deleted item!"); }); $(".dynamicform_wrapper").on("limitReached", function(e, item) { alert("Limit reached"); });
It is a widget for melon.ng to clone form elements of related models.
BSD-3-Clause
extension yii2 widget melon.ng