GithubHelp home page GithubHelp logo

Comments (7)

unclead avatar unclead commented on July 24, 2024

@kenjisoul what version of the widget you're using?

from yii2-multiple-input.

kenjisoul avatar kenjisoul commented on July 24, 2024

@kenjisoul what version of the widget you're using?

"unclead/yii2-multiple-input": "~2.0"

yii2 latest version

bootstrap4

from yii2-multiple-input.

unclead avatar unclead commented on July 24, 2024

the widget was written in the time of BS3 and nobody has added support of BS4 😄 Probably, you need to use this trick https://unclead.github.io/yii2-multiple-input/icons/

from yii2-multiple-input.

unclead avatar unclead commented on July 24, 2024

@kenjisoul did it solve the issue?

from yii2-multiple-input.

kenjisoul avatar kenjisoul commented on July 24, 2024

@unclead I cannot find icon library to add that code, which file to add that code?

from yii2-multiple-input.

unclead avatar unclead commented on July 24, 2024

It depends on the icon library you're using. AFAIR, there is no built-in library like glyphicons in BS4, so you should:

  1. either use font awesome and in in this case you just need to set the option iconSource in the widget settings
<?=
            $form->field($model, 'i_name')->widget(MultipleInput::className(), [
                'max' => 6,
                'min' => 1, // should be at least 2 rows
                'allowEmptyList' => false,
                'enableGuessTitle' => true,
                'addButtonPosition' => MultipleInput::POS_HEADER, // show add button in the header
               'iconSource' => 'fa'
            ])
            ->label(false)
 ?>

2) or you a custom library and configure required icons using the option 'iconMap'

from yii2-multiple-input.

kenjisoul avatar kenjisoul commented on July 24, 2024

Thank you, I'm solved.

add this link <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"> and add 'iconSource' => 'fa'

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.