当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::widget方法代码示例

本文整理汇总了PHP中kartik\builder\Form::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::widget方法的具体用法?PHP Form::widget怎么用?PHP Form::widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\builder\Form的用法示例。


在下文中一共展示了Form::widget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     $form = ActiveForm::begin($this->formOptions);
     $column = [];
     $options = $this->attributeOptions;
     if (!isset($options['fieldConfig'])) {
         $options['fieldConfig'] = [];
     }
     if (!isset($options['fieldConfig']['template'])) {
         $options['fieldConfig']['template'] = "{input}\n{hint}\n{error}";
     }
     switch ($this->type) {
         case EditableType::TYPE_TEXT:
             $column[$this->attribute] = ExtForm::textField($options);
             break;
     }
     echo Form::widget(['model' => $this->model, 'form' => $form, 'attributes' => $column]);
     ActiveForm::end();
 }
开发者ID:hanterrian,项目名称:field-extensions,代码行数:19,代码来源:FormWidget.php

示例2:

use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Meta $model
 * @var yii\widgets\ActiveForm $form
 */
$parents = \yii\helpers\ArrayHelper::map(\common\models\Meta::find()->where(['status' => \common\models\Meta::STATUS_ACTIVE, 'type' => \common\models\Meta::TYPE_ARTICLE_CATEGORIES, 'parent_id' => 0])->asArray()->all(), 'id', 'name');
$parents = \yii\helpers\ArrayHelper::merge([0 => '顶级分类'], $parents);
?>

<div class="meta-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['name' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 32, 'placeholder' => 'Enter Name...']], 'slug' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255, 'placeholder' => 'Enter Slug...']], 'parent_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \kartik\widgets\Select2::className(), 'options' => ['data' => $parents]], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 5, 'maxlength' => 255, 'placeholder' => 'Enter Description...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>
    <?php 
ActiveForm::end();
?>

</div>
开发者ID:luobenyu,项目名称:blog-1,代码行数:30,代码来源:_form.php

示例3:

use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
 * @var yii\web\View $this
 * @var common\models\ProductCat $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="product-cat-search">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'action' => ['index'], 'method' => 'get']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Название категории...', 'maxlength' => 255]], 'parent_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductCat::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]]]]);
?>
    <div class="form-group">
        <?php 
echo Html::a(Yii::t('app', 'Reset'), ['index'], ['class' => 'btn btn-default', 'style' => 'margin-left: 15px; margin-right: 10px']);
?>
        <?php 
echo Html::submitButton(Yii::t('app', Yii::t('app', 'Search')), ['class' => 'btn btn-default', 'onclick' => ' $.pjax.reload({container: "#w2", data: $("#w0").serialize()  }); return false;']);
?>
  
    </div>

    <?php 
ActiveForm::end();
?>
开发者ID:kibercoder,项目名称:bilious-octo-fibula,代码行数:30,代码来源:_search.php

示例4:

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Preferences $model
 * @var yii\widgets\ActiveForm $form
 */
?>
<div class="preferences-form">

    <?php 
$form = ActiveForm::begin(['id' => 'preferences-form', 'type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'columnSize' => Form::SIZE_LARGE, 'attributes' => ['codes' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 参数编码...', 'maxlength' => 4]], 'name1' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 参数名称...', 'maxlength' => 80]], 'classmark' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 项目分类-英文...', 'maxlength' => 30, 'value' => $model->isNewRecord && Yii::$app->request->get('create-classmark') ? Yii::$app->request->get('create-classmark') : $model->classmark]], 'classmarkcn' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 项目分类-中文...', 'maxlength' => 50, 'value' => $model->isNewRecord && Yii::$app->request->get('create-classmark') ? \common\models\Preferences::getClassmarkcnByClassmark(Yii::$app->request->get('create-classmark')) : $model->classmarkcn]], 'status' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => $model->getStatusOptions()]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer', 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
    </div>
    <?php 
//echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer','class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>
开发者ID:tqsq2005,项目名称:Yii2adv,代码行数:29,代码来源:_form.php

示例5:

<?php

use yii\helpers\Html;
//use yii\widgets\ActiveForm;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Answers */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="answers-form">

    <?php 
$form = ActiveForm::begin();
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['questions_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => ArrayHelper::map($model->getAllQuestions(), 'id', 'questions'), 'options' => ['placeholder' => 'Выберите Вопрос', 'id' => 'season-id'], 'pluginOptions' => ['allowClear' => true]]], 'answer' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите ответ...']], 'actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="margin-top: 20px">' . Html::resetButton('Сбросить', ['class' => 'btn btn-default']) . ' ' . Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) . '</div>']]]);
ActiveForm::end();
?>

</div>
开发者ID:kusma007,项目名称:one-advanced,代码行数:21,代码来源:_form.php

示例6:

$data_cargos = ArrayHelper::map($cargos, 'descricao', 'descricao');
echo $form->field($model, 'cargo')->widget(Select2::classname(), ['data' => array_merge(["" => ""], $data_cargos), 'options' => ['placeholder' => 'Selecione o cargo...'], 'pluginOptions' => ['allowClear' => true]]);
?>


                    <?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => true, 'placeholder' => 'Nome completo...']);
?>

                    <?php 
echo $form->field($model, "datanascimento")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'displayFormat' => 'dd/MM/yyyy', 'autoWidget' => false, 'widgetClass' => 'yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999', 'options' => ['class' => 'form-control', 'placeholder' => 'Data nascimento...']]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['cpf' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu CPF...']], 'identidade' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu RG...']], 'orgao_exped' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe o orgão expedidor...']], 'sexo' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [true => 'Masculino', false => 'Feminino'], 'options' => ['inline' => true]]]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail...']], 'emailAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail alternativo...']], 'telefone' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone...']], 'telefoneAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone alternativo...']]]]);
?>
                       
                    <?php 
$form->field($model, 'cpf')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '999.999.999-99']);
?>

                    <?php 
$form->field($model, 'telefone')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
?>

                    <?php 
$form->field($model, 'telefoneAlt')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
开发者ID:FernandoMauricio,项目名称:processos_seletivos,代码行数:31,代码来源:_form-candidato.php

示例7:

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
use common\widgets\edit\InputFile;
use common\widgets\edit\Redactor;
/**
 * @var yii\web\View $this
 * @var common\models\ProductTypeHasDiagnos $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="product-type-has-diagnos-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['diagnos_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\Diagnos::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'product_type_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductType::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>
开发者ID:kibercoder,项目名称:bilious-octo-fibula,代码行数:29,代码来源:_form.php

示例8:



    
 <?=

 Form::widget([
        'model'=>$model,
        'form'=>$form,
        'columns'=>3,
        'attributes'=>[       // 2 column layout
            'zoek'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'vul hier je zoektekst in', 'class'=>'col-md-9']],
           'startdatum' =>['type'=>Form::INPUT_WIDGET, 
                'widgetClass'=>'\kartik\widgets\DatePicker',
                'options'=>[
                            'class'=>'col-md-9', 
                            'language' => 'nl',
                            ]], 
            'einddatum' =>['type'=>Form::INPUT_WIDGET, 
                'widgetClass'=>'\kartik\widgets\DatePicker',
                'options'=>[
                            'class'=>'col-md-9', 
                            'language' => 'nl',
                            ]], 
            
            ] 
        ]);
    

?>

开发者ID:jaccos,项目名称:wrkmtspr_prd,代码行数:26,代码来源:_search.php

示例9:

        <div class="col-md-4"><?php 
echo $form->field($model, 'siap')->textInput(['maxlength' => 15]);
?>
</div>
    </div>

    <div class="row">
        <div class="col-md-4"><?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => 200]);
?>
</div>
    </div>

    <div class="row">
        <div class="col-md-4"><?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['username' => ['type' => Form::INPUT_TEXT], 'password' => ['type' => Form::INPUT_PASSWORD]]]);
?>
</div>
    </div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Cadastrar') : Yii::t('app', 'Atualizar'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
开发者ID:jrscampelo,项目名称:SCP-Sistema-de-Controle-de-Ponto,代码行数:31,代码来源:_form.php

示例10:

	<?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['frequency' => ['label' => Yii::t('igolf', 'Recurrence'), 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('FREQUENCY_'), 'columnOptions' => ['colspan' => 4]], 'interval' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 30]], 'columnOptions' => ['colspan' => 4]], 'repeat' => ['label' => Yii::t('igolf', 'every'), 'type' => Form::INPUT_STATIC, 'columnOptions' => ['colspan' => 4]]]]);
echo '<div class="recurrence_byweekday">';
echo $form->field($model, 'byweekday')->checkboxButtonGroup(Enum::dayList())->label(false);
echo '</div>';
echo '<div class="recurrence_bymonth">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonthday' => Yii::t('igolf', 'on day')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonthday' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposday' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 4], 'label' => false], 'weekday4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_byyear">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonth' => Yii::t('igolf', 'on')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonth' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false], 'monthday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposmonth' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'weekday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'month4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_until">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['until' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('UNTIL_'), 'columnOptions' => ['colspan' => 4]], 'count' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 20]], 'columnOptions' => ['colspan' => 4]], 'date_end' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DatePicker::className(), 'options' => ['pluginOptions' => ['format' => 'yyyy/mm/dd', 'todayHighlight' => true]], 'columnOptions' => ['colspan' => 4], 'label' => Yii::t('igolf', 'End Date')]]]);
echo '</div>';
?>

	<div class="form-group">
	    <?php 
echo Html::button(Yii::t('igolf', 'Cancel'), ['class' => 'btn btn-danger', 'data' => ['dismiss' => 'modal']]);
?>
	    <?php 
echo Html::button(Yii::t('igolf', 'OK'), ['class' => 'btn btn-success action-ok', 'data' => ['dismiss' => 'modal']]);
?>
	</div>

</div>
<script type="text/javascript">
<?php 
开发者ID:kleitz,项目名称:golfleague,代码行数:30,代码来源:scheduler.php

示例11: JsExpression

                                'errorLoading' => 'Buscando ...',
                                'ajax' => [
                                    'url' => \yii\helpers\Url::to(['localidad/find']),
                                    'dataType' => 'json',
                                    'data' => new JsExpression('function(params) { return {q:params.term}; }')
                                ],
                                'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
                                'templateResult' => new JsExpression('function(city) { return city.nombre; }'),
                                'templateSelection' => new JsExpression('function (city) { return city.nombre; }'),
                            ],
                        ],
                ],
            ]
        ]);
*/
$dataLocalidad = ArrayHelper::map(\app\models\Localidad::find()->asArray()->all(), 'id', 'nombre');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['domicilio' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Ingrese Domicilio...']], 'localidad_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['options' => ['placeholder' => 'Seleccione Ciudad...'], 'data' => $dataLocalidad, 'pluginOptions' => ['allowClear' => true]]]]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:30,代码来源:_form.php

示例12:

<?php

use yii\helpers\ArrayHelper;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Acervo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="acervo-form">   
      <div class="row">
        <div class="col-sm-12">   
    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['restauracion' => ['type' => Form::INPUT_TEXT, 'label' => 'Restauración', 'options' => ['placeholder' => 'Detalles...']], 'fechaInicioRestauracion' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha de Inicio Restauracióna (dd/mm/aaaa)'], 'fechaFinRestauracion' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha del Fin de la Restauracióna (dd/mm/aaaa)']]]);
?>
            </div>
          </div>
</div>
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:19,代码来源:_form_restauracion.php

示例13:

use kartik\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\builder\Form;
/* @var $this yii\web\View */
/* @var $model app\models\TipoAcervo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="tipo-acervo-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
?>

    <?php 
$dataTipoAcervo = ArrayHelper::map(\app\models\TipoAcervo::find()->where(['is', 'tipoAcervo_id', NULL])->asArray()->all(), 'id', 'descripcion');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['descripcion' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Descripcion...']], 'tipoAcervo_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $dataTipoAcervo], 'pluginOptions' => ['allowClear' => true], 'hint' => 'Seleccione la colección a la que pertenece el acervo']]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:30,代码来源:_form.php

示例14: run

 public function run()
 {
     $options = ['model' => $this->model, 'form' => $this->_form, 'attributes' => $this->attributes] + $this->options;
     echo Form::widget($options);
     if ($this->buttons != null) {
         $tag = ArrayHelper::remove($this->buttonsContainer, 'tag', 'div');
         echo Html::tag($tag, $this->_buttons, $this->buttonsContainer);
     }
     ActiveForm::end();
 }
开发者ID:imagis,项目名称:yii2-user,代码行数:10,代码来源:BaseForm.php

示例15:

      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive">
          Algemeen reis tarief
        </a>
      </h4>
    </div>
    <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
      <div class="panel-body">
          
       <div class="panel panel-warning">
  <div class="panel-heading">
    <h3 class="panel-title">Algemeen reis tarief</h3>
  </div>
  <div class="panel-body">
       <?php 
echo Form::widget(['model' => $tariefReizen, 'form' => $form, 'columns' => 3, 'attributes' => ['vrije_km' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => '0']], 'tarief' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => '0,0']], 'tarief_eenheid' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Km']]]]);
?>
   </div>
</div>

      
</div>
</div>
</div>
<!--END   tariefReizen ------------------------------------------>

<!--START   Documenten ------------------------------------------>
<div class="panel panel-primary">
    <div class="panel-heading" role="tab" id="headingSix">
      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix">
开发者ID:jaccos,项目名称:wrkmtspr_prd,代码行数:31,代码来源:update.php


注:本文中的kartik\builder\Form::widget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。