R
R
rusline2017-02-19 21:24:45
Yii
rusline, 2017-02-19 21:24:45

What is the address in the DepDrop widget?

I ran into a problem, I can’t understand what kind of url the link in the documentation indicates the DepDrop widget. It as I understand record to the table which is in model? or something I missed?

echo $form->field($model, 'subcat')->widget(DepDrop::classname(), [
    'options'=>['id'=>'subcat-id'],
    'pluginOptions'=>[
        'depends'=>['cat-id'],
        'placeholder'=>'Select...',
        'url'=>Url::to(['/site/subcat'])
    ]
]);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2017-02-19
@rusline

Good evening.
Read
And so, site - controller, subcat - action

M
Maxim Fedorov, 2017-02-20
@qonand

This is a link to a controller action that returns the data that will be displayed in the dropdown list. Used for ajax data loading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question