kartik-v / yii2-widget-activeform

Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).
http://demos.krajee.com/widget-details/active-form
Other
64 stars 35 forks source link

Multiple input field addons in ActiveForm's ActiveField #79

Closed arturszulc closed 8 years ago

arturszulc commented 8 years ago

Currently, we can add only one input addon of each kind (prepended or appended) to the input field. Adding more than one on the same side requires some tricks like string concatenation. It would be great if ActiveField class would support providing an array of addon configuration to add more than one input addon like:

<?= $form->field($model, 'attribute', [
    'addon' => [
        'append' => [
            ['content' => 'Addon #1'],
            ['content' => 'Addon #2'],
            [...],
        ]
    ]
]);
?>

It would be great if such a feature would be added.