• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP builder\Form类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Form类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16:

<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use app\models\forms\EmailForm;
use app\components\helpers\PollUrl;
echo Html::tag('p', Html::encode(Yii::t('app', 'You can use the tags <member-name>, <member-group> and <voting-code> or <voting-link> (for clickable link) to customize your message for each member.')));
?>
<div class="email-form">
<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'action' => PollUrl::toRoute(['email/sendsingle', 'member_id' => $member->id])]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['subject' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255]], 'message' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 6]]]]);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary']);
?>
    </div>
<?php 
ActiveForm::end();
?>
</div>
开发者ID:EuresTools,项目名称:eVote-web,代码行数:23,代码来源:_email_form.php


示例17:

<?php

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

<div class="season-details-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['season_id' => ['type' => Form::INPUT_WIDGET, 'label' => 'Сезон', 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $model->getAllSeason(), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберите сезон']]], 'team_id' => ['type' => Form::INPUT_WIDGET, 'label' => 'Сезон', 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $model->getAllTeam(), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберите команду']]], 'actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="margin-top: 20px;margin-bottom: 20px;">' . Html::a('Reset', ['index'], ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Search', ['class' => 'btn btn-primary']) . '</div>']]]);
?>

<!--    --><?php 
//echo $form->field($model, 'id')
?>
<!--    <div class="row">-->
<!--        <div class="col-xs-6">--><?php 
//echo $form->field($model, 'season_id')
?>
<!--</div>-->
<!--        <div class="col-xs-6">--><?php 
//echo $form->field($model, 'team_id')
?>
<!--</div>-->
<!--    </div>-->
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:_search.php


示例18: function

use common\widgets\elfinder\InputFile;
use yii\bootstrap\Modal;
use mihaildev\elfinder\ElFinder;
use yii\web\JsExpression;
/**
 * @var yii\web\View $this
 * @var common\models\Post $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="post-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100, 'plugins' => ['elfinder', 'fontcolor']]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\User::find()->all(), 'id', 'username'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'category_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\PostCategory::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'state_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Post())->getStateIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'main_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Главная...']], 'noforeign_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Noforeign ID...', 'maxlength' => 11]], 'created_datetime' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATETIME]], 'start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_TIME]], 'preview_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']], 'doc_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']]]]);
/*
        ?>
        <script>
              if (!RedactorPlugins) var RedactorPlugins = {};
              RedactorPlugins.elfinder = function()
              {
                  return {
                      init: function()
                      {
                          var elfinder = this.button.add('elfinder', 'Elfinder');
                          this.button.setAwesome('elfinder', 'fa-elfinder');
                          this.button.addCallback(elfinder, this.elfinder.openElfinder);
                      },
                      openElfinder: function()
                      {
开发者ID:kibercoder,项目名称:bilious-octo-fibula,代码行数:31,代码来源:_form.php


示例19:

 <?php 
use yii\bootstrap\Html;
use kartik\form\ActiveForm;
use kartik\builder\Form;
use kartik\switchinput\SwitchInput;
use yii\helpers\Url;
use frontend\packages\BootstrapTreeviewAsset;
BootstrapTreeviewAsset::register($this);
?>
 

			<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3], 'enableAjaxValidation' => true, 'id' => 'frmBookingForm']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Event title...']], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Event description...'], 'columnOptions' => ['colspan' => 2]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['calendar_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->CalendarComponent->myCalendarList, 'options' => ['id' => 'calendar_id', 'placeholder' => 'Select a calendar']], 'project_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->ProjectComponent->myProjectList, 'options' => ['id' => 'project_id', 'placeholder' => 'Select a project']]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\datecontrol\\DateControl', 'options' => ['options' => ['id' => 'start_date']]], 'all_day_option_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => $model->allDayOptions]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'start_time']]], 'end_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'end_time']]]]]);
?>
<input type="hidden" name="_csrf" value="<?php 
echo Yii::$app->request->getCsrfToken();
?>
" />
<?php 
\kartik\form\ActiveForm::end();
?>
	
开发者ID:spiro-stathakis,项目名称:projects,代码行数:25,代码来源:_bookingForm.php


示例20:

<?php

use app\models\Wineries;
use app\models\Appellations;
use app\models\Varietals;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use kartik\widgets\ActiveForm;
use kartik\widgets\Select2;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var app\models\Wines $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="wines-form">
    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['upc_barcode' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Upc Barcode...', 'maxlength' => 30]], 'wine_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Wine Name...', 'maxlength' => 45]], 'winery_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Wineries::find()->orderBy('winery_name')->asArray()->all(), 'id', 'winery_name')], 'appellation_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Appellations::find()->orderBy('app_name')->asArray()->all(), 'id', 'app_name')], 'wine_year' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Wine Year...', 'maxlength' => 4]], 'wine_varietal_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Varietals::find()->orderBy('varietal_name')->asArray()->all(), 'id', 'varietal_name')], 'bottle_size' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Bottle Size...', 'maxlength' => 15]], 'bottle_size' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Yii::$app->params['bottle_sizes']], 'overall_ra 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP date\DatePicker类代码示例发布时间:2022-05-23
下一篇:
PHP base\Config类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap