示例#1
0
    <div class="panel-body">

        <div class="meme-vidmage-form">

            <?php 
$form = ActiveForm::begin(['id' => 'MemeVidmage', 'layout' => 'horizontal', 'enableClientValidation' => true, 'errorSummaryCssClass' => 'error-summary alert alert-error']);
?>

            <div class="">
                <?php 
$this->beginBlock('main');
?>

                <p>
            <?php 
echo $form->field($model, 'meme_id')->dropDownList(Meme::getMappedArray());
?>
            <?php 
echo $form->field($model, 'vidmage_id')->dropDownList(Vidmage::getMappedArray());
?>
			<?php 
echo $form->field($model, 'is_the_origin')->checkBox();
?>
			<?php 
echo $form->field($model, 'likes')->textInput();
?>
                </p>
                <?php 
$this->endBlock();
?>
示例#2
0
    echo $form->field($model, 'views')->textInput();
    ?>
                    <?php 
}
?>
                    <?php 
echo $form->field($model, 'is_active')->checkBox();
?>

                    <div class="form-group">
                        <label class="control-label col-sm-3" for="vidmage-vidmagememes">
                            Memes
                        </label>
                        <div class="col-sm-6">
                            <?php 
echo Select2::widget(['name' => 'vidmageMemes', 'data' => Meme::getMappedArray(), 'value' => ArrayHelper::getColumn($model->memeVidmages, 'meme_id'), 'options' => ['placeholder' => 'Select a Meme ...', 'multiple' => true], 'pluginOptions' => ['tags' => true]]);
?>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="control-label col-sm-3" for="vidmage-vidmagecategories">
                            <?php 
echo $model->getAttributeLabel('vidmageCategories');
?>
                        </label>
                        <div class="col-sm-6">
                            <?php 
echo Select2::widget(['name' => 'vidmageCategories', 'data' => Category::getMappedArray(), 'value' => ArrayHelper::getColumn($model->vidmageCategories, 'category_id'), 'options' => ['placeholder' => 'Select a category ...', 'multiple' => true], 'pluginOptions' => []]);
?>
                        </div>