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


PHP ActiveForm::end方法代码示例

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


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

    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'image')->widget(InputFile::className(), ['controller' => 'elfinder', 'filter' => 'image', 'template' => '<div class="input-group">
                                                {input}<span class="input-group-btn">{button}</span>
                                            </div>', 'options' => ['class' => 'form-control'], 'buttonName' => Yii::t('document', 'Выбрать файл'), 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]);
?>
        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'position')->textInput(['maxlength' => true]);
?>
        </div>
    </div>

    <div id = "lb-document-module-fields">
        <?php 
echo $this->render('_fields', ['model' => $model]);
?>
    </div>

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

</div>

<?php 
$document_id = $model->isNewRecord ? 0 : $model->id;
$this->registerJs("\n    \$('.repeat-name').click(function(){\n        var text = \$('#document-name').val();\n        \$('#document-title').val(text);\n    });\n    \$('.translate-name').click(function(){\n        var text = \$('#document-name').val().toLowerCase();\n        result = translit(text);\n    \$('#document-alias').val(result);\n    });\n    \$('.translate-title').click(function(){\n        var text = \$('#document-title').val().toLowerCase();\n        result = translit(text);\n    \$('#document-alias').val(result);\n    });\n\n    \$('.template_id').change(function(){\n        var template_id = \$(this).val();\n        \$.ajax({\n            url: '" . Url::to(['document/change']) . "',\n            type: 'POST',\n            data: {\n                'id' : " . $document_id . ",\n                'template_id' : template_id\n            },\n            success: function(data){\n                \$('#lb-document-module-fields').html(data);\n            }\n        });\n    });\n");
开发者ID:lowbase,项目名称:yii2-document,代码行数:30,代码来源:_form.php

示例3:

				  <div class="panel-heading">
				    <h3 class="panel-title">Observaciones</h3>
				  </div>
				<div class="panel-body">
						<div class="row">
		          <div class="col-sm-12">
		            <?= $form->field($model,'observaciones',[  'showLabels'=>false,
		            'showErrors'=>false,
		            //'addon' => ['prepend' => ['content'=>'<i class="fa fa-envelope fa-lg fa-fw"></i>']],
		            'options'=>['class' => 'form-group']]
		            )->textarea([
		                                'class' => 'form-control input-lg',
		                                'placeholder'=>$model->getAttributeLabel('observaciones'),
		                                'name'=>'observaciones',
		                                'id'=>'observaciones'
		                            ]
		            );?> 
		          </div>
		        </div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
	  <div class="form-group">
	    <?= Html::submitButton($model->isNewRecord ? 'Guardar' : 'Guardar cambios', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
	  </div>
	</div>
	<?php ActiveForm::end(); ?>
</div>
开发者ID:rzamarripa,项目名称:du,代码行数:31,代码来源:_form.php

示例4: foreach

    }
    ?>
    <?php 
    $properties = \app\models\Property::getForGroupId($group->id);
    ?>
    <?php 
    foreach ($properties as $property) {
        ?>
        <?php 
        echo $property->handler($form, $model->abstractModel, [], 'frontend_edit_view');
        ?>
    <?php 
    }
}
echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary']);
\kartik\widgets\ActiveForm::end();
\yii\bootstrap\Modal::end();
?>

<?php 
$js = <<<JS
    "use strict";
    \$('#orderchat-message').keypress(function (event) {
        if (event.keyCode == 10) {
            \$(this).parents('form').eq(0).submit();
        }
    });
    \$('body').on('editableSuccess', function () {
        location.reload();
    });
    \$('#print-button').click(function () {
开发者ID:Razzwan,项目名称:dotplant2,代码行数:31,代码来源:view.php

示例5:

<?php 
echo $form->field($model, 'out_account_id')->dropDownList($persons);
?>

<?php 
echo $form->field($model, 'in_account_id')->dropDownList($me);
?>

<?php 
echo $form->field($model, 'create_time')->widget('kartik\\widgets\\DateTimePicker');
?>

<?php 
echo $form->field($model, 'over_time')->widget('kartik\\widgets\\DatePicker', ['pluginOptions' => ['format' => 'yyyy-m-d']]);
?>

<?php 
echo $form->field($model, 'description')->textInput();
?>

<?php 
echo Html::submitButton('Create', ['class' => 'btn btn-success']);
?>

<?php 
$form = ActiveForm::end();
?>

<?php 
echo Html::a('返回', '/index.php?r=fund/currency/index');
开发者ID:jh27408079,项目名称:magenet,代码行数:30,代码来源:borrow.php

示例6: 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


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