2amigos / yiiwheels

Widget extension library for the YiiStrap extension
http://yiiwheels.2amigos.us
Other
133 stars 77 forks source link

WhCountries selection restriction #81

Closed faeron closed 9 years ago

faeron commented 10 years ago

For me the restriction to set selectable countries is not working if I set the plugin option "available". Is it even implemented? Anyone got it working though?

tonydspaniard commented 10 years ago

@Skullcrasher Please, provide your code so I can check. Thanks!

faeron commented 10 years ago

I also use the yii smarty renderer, thats why the code looks a bit different.

{widget name="yiiwheels.widgets.formhelpers.WhCountries"
    _name= 'Object[country]'
    useHelperSelectBox = true
    value = 'DE'
    pluginOptions = [
            'country'=>'DE',
            'flags'=>false,
            'available'=>'DE,US'
        ]
}

but the options work, except the "available" option at the plugin website http://bootstrapformhelpers.com/country/ it should be example 2

tonydspaniard commented 10 years ago

I think what you are looking is to use the htmlOptions instead:

htmlOptions => array(
   'data-available' => 'DE,US'
)