Katik Dependent Dropdown
Category Model public static function getCategories() { return Self::find()->select(['name', 'id'])->indexBy('id')->column(); } Sub Category Model public static function getSubCatList($categoryID, $ isAjax = false) { $subCategory = self::find() ->where(['category_id' => $categoryID]); if ($isAjax == true) { return $subCategory->select(['id', 'name'])->asArray()->all(); } else { return $subCategory->select(['name'])->indexBy('id')->column(); } } Product model public static function getProductList($categoryID, $subCatID, $ isAjax = false) { $product = self::find() ->where(['category_id' => $categoryID]) ...
Hi, i read your solution in stackoverflow.com
ReplyDeletejust want to ask how to register javascript function in dynamic form (dropDownList). I follow your instruction got error "the function is not defined". Thanks.