Download the PHP package softark/yii2-dual-listbox without Composer

On this page you can find all versions of the php package softark/yii2-dual-listbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-dual-listbox

yii2-dual-listbox

Dual Listboxt for Yii framework 2.0.

Description

softark\duallistbox\DualListbox widget is a Yii 2 wrapper for Bootstrap Dual Listbox.

It works with bootstrap 3, 4, or 5

Requirements

Usage

  1. Add softark/yii2-dual-listbox and istvan-ujjmeszaros/bootstrap-duallistbox in your project's composer.json, and let Composer configure your project.

    • You have to use a different version of istvan-ujjmeszaros/bootstrap-duallistbox depending on the bootstrap version.
    • For bootstrap 3, use ~3.0.0 :

    • For bootstrap 4 and 5, use ~4.0.0:
  2. Use softark\duallistbox\DualListbox::widget() in place of yii\helpers\Html::listBox(), yii\helpers\Html::activeListBox(), or yii\widgets\ActiveField::listBox() in your view.

    1. Replacing Html::listBox() using name and selection

    2. Replacing Html::activeListBox() using model and attribute

    3. Replacing ActiveField::listBox() using model and attribute
  3. Collect the user input in the server side, just as you do with a single Listbox with multiple selection. Note that the input value will be an array.

    If you find difficulty in handling the user input, please read A Sample Code which demonstrates how to use a dual listbox to the data in array format.

Properties of softark\duallistbox\DualListbox

  1. name @var string

    The input name.

  2. selection @var array

    The selected values.

  3. model @var yii\base\Model

    The model object.

  4. attribute @var string

    The attribute name.

  5. items @var array

    The option data items. The array keys are option values, and the array values are the corresponding option labels.

  6. options @var array

    The tag options for the listbox in terms of name-value pairs.

  7. clientOptions @var array

    The options for the Bootstrap Dual Listbox in terms of name-value pairs. See Initialzation parameters object section of the official documentation of Bootstrap Dual Listbox for details.

The first 6 properties correspond to the parameters used in Html::listBox(), Html::activeListBox() and ActiveField::listBox().

Note that you have to use either name-selection pair or model-attribute pair. The former is for replacing Html::listBox() and the latter is for Html::activeListBox() and ActiveField::listBox().

Notice

For some reason, Bootstrap Dual Listbox doesn't work in mobile device browsers, and so you can not use this widget for them.

Consider using checkbox list instead.

History


All versions of yii2-dual-listbox with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0
istvan-ujjmeszaros/bootstrap-duallistbox Version ^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package softark/yii2-dual-listbox contains the following files

Loading the files please wait ....