2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-advanceddropdowns

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

image

dnadesign/silverstripe-advanceddropdowns

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  • Friday, April 27, 2018
  • by Leapfrognz
  • Repository
  • 8 Watchers
  • 14 Stars
  • 7,314 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 6 % Grown

The README.md

AdvancedDropdowns

Introduction

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag. Very useful for third party dropdown styling such as (http://silviomoreto.github.io/bootstrap-select/) which rely on data-attributes on options., (*1)

Please note this module is a work in progress and has no tests., (*2)

AdvandedDropdownField

Set up your AdvandedDropdownField's as follows:, (*3)

new AdvancedDropdownField('AdvancedDropdown', 'DropdownField with option attributes', array(
    'value1' => array(
        'Title' => 'Option 1',
        'Attributes' => array(
            'data-myattribute' => 'This is an attribute value'
        )
    ),
    'value2' => array(
        'Title' => 'Option 2',
        'Attributes' => array(
            'data-myattribute' => 'This is an attribute value'
            'data-myattribute2' => 'This is a second attribute value'
        )
    )
));

AdvandedGroupedDropdownField

Set up your AdvandedGroupedDropdownField's as follows:, (*4)

new AdvancedGroupedDropdownField('AdvancedGroupedDropdown', 'Advanced grouped dropdown', array(
    'value1' => array(
        'Title' => 'Ungrouped option',
        'Attributes' => array(
            'data-myattribute' => 'This is an attribute value'
        )
    ),
    'Option group 1' => array(
        'value2' => array(
            'Title' => 'Option 2',
            'Attributes' => array(
                'data-myattribute' => 'This is an attribute value'
            )
        ),
        'value3' => array(
            'Title' => 'Option 3',
            'Attributes' => array(
                'data-myattribute' => 'This is an attribute value'
            )
        )
    ),
    'Option group 2' => array(
        'value4' => array(
            'Title' => 'Option 4',
            'Attributes' => array(
                'data-myattribute' => 'This is an attribute value'
            )
        ),
        'value5' => array(
            'Title' => 'Option 5',
            'Attributes' => array(
                'data-myattribute' => 'This is an attribute value'
                'data-myattribute2' => 'This is a second attribute value'
            )
        )
    )
));

Maintainer Contact

* James ayers (james.ayers@dna.co.nz)

Requirements

  • SilverStripe 3.x

License

BSD-3-Clause. See LICENSE., (*5)

The Versions

27/04 2018

dev-master

9999999-dev

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

27/04 2018

2.0.3

2.0.3.0

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

08/09 2017

2.0.2

2.0.2.0

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

02/09 2017

dev-feature/silverstripe-4

dev-feature/silverstripe-4

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

02/09 2017

2.0

2.0.0.0

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

07/02 2017

3.0.x-dev

3.0.9999999.9999999-dev

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

07/02 2017

1.0

1.0.0.0

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe

07/02 2017

2.0.1

2.0.1.0

DropdownField and GroupedDropdownField that allows the use of data-attributes on each option tag

  Sources   Download

BSD-3-Clause

The Requires

 

by james Ayers

select dropdown silverstripe