GithubHelp home page GithubHelp logo

Dependent Dropdown about yii2-multiple-input HOT 9 CLOSED

unclead avatar unclead commented on July 20, 2024
Dependent Dropdown

from yii2-multiple-input.

Comments (9)

unclead avatar unclead commented on July 20, 2024 1

@rahulk-k have you tried this widget: https://github.com/kartik-v/yii2-widget-depdrop ?

You can use this widget in the same way as other widgets. Cant see any problems with it

from yii2-multiple-input.

YasserSB avatar YasserSB commented on July 20, 2024 1

If we use this widget: https://github.com/kartik-v/yii2-widget-depdrop

when reguler use with https://github.com/kartik-v/yii2-widget-depdrop , i dont have issue, but when combine it with multiple input how we set the parent target of depdrop? can you give me example?
i am little confuse with it.

from yii2-multiple-input.

loveorigami avatar loveorigami commented on July 20, 2024 1

I have same question
My config

<?= $form->field($model, 'field')->widget(MultipleInput::className(), [
                            'id' => 'my_id',
                            'max' => 2,
                            'rowOptions' => [
                                'id' => 'row{multiple_index_my_id}', // replaced
                            ],
                            'columns' => [
                                [
                                    'name' => 'parent_ids',
                                    'type' => 'dropDownList',
                                    'items' => $this->getCats(),
                                    'options' => [
                                        'id' => 'parent-{multiple_index_my_id}' // replaced
                                    ]
                                ],
                                [
                                    'name' => 'child_ids',
                                    'type' => \kartik\depdrop\DepDrop::class,
                                    'options' => [
                                        'pluginOptions' => [
                                            'depends' => ['parent-{multiple_index_my_id}'], // !!!! NOT replaced
                                            'placeholder' => 'Select...',
                                            'url' => 'wqw'
                                        ]
                                    ]
                                ],
                            ]
    ]);
    ?>

but in 'depends' => ['parent-{multiple_index_my_id}'], placeholder is not replaced.

from yii2-multiple-input.

unclead avatar unclead commented on July 20, 2024

I need to try. Never tried it before 😄

from yii2-multiple-input.

unclead avatar unclead commented on July 20, 2024

@YasserSB i guess this https://github.com/unclead/yii2-multiple-input/wiki/Tips-and-Tricks#use-of-a-widgets-placeholder can helps you

from yii2-multiple-input.

YasserSB avatar YasserSB commented on July 20, 2024

Oh I miss it, thank you so much :D

I think this close my issue ;)

from yii2-multiple-input.

ered15 avatar ered15 commented on July 20, 2024

@loveorigami did u find a solution for that problem? im having the same issue

from yii2-multiple-input.

loveorigami avatar loveorigami commented on July 20, 2024

@ered15 No, I did without kartik\depdrop\DepDrop

from yii2-multiple-input.

ered15 avatar ered15 commented on July 20, 2024

well that's bad news, I have everything working as expected, just missing the dynamic ID, I tried using depdrop_all_params putting manual ids using an array

'depends'=>[0='parent-0',1=>'parent-1']

but it's not working as expected when adding rows, @unclead any tip to get this working?

from yii2-multiple-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.