Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 717 Bytes

renderers.md

File metadata and controls

28 lines (22 loc) · 717 Bytes

##Renderers

Currently widget supports two type of renderers

###TableRenderer Table renderer

This renderer is enabled by default.

###ListRenderer List renderer

To enable this renderer you have to use an option rendererClass

<?php
echo $form->field($model, 'schedule')->widget(MultipleInput::className(), [
    'rendererClass' => \unclead\multipleinput\renderers\ListRenderer::className(),
    'max' => 4,
    'allowEmptyList' => true,
    'rowOptions' => function($model) {
        $options = [];

        if ($model['priority'] > 1) {
            $options['class'] = 'danger';
        }
        return $options;
    },