Last active
August 29, 2015 14:05
-
-
Save DrMabuse23/1472a6d39fbcd351f1b5 to your computer and use it in GitHub Desktop.
my trys to use the resatpai with activeform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use yii\helpers\Html; | |
use yii\widgets\ActiveForm; | |
/* @var $this yii\web\View */ | |
/* @var $model \common\models\base\MagazineBase */ | |
/* @var $form ActiveForm */ | |
?> | |
<div class="form_magazine"> | |
<?php $form = ActiveForm::begin([ | |
'action' => \yii\helpers\Url::to(['/api/magazine-api/create']), | |
'enableAjaxValidation' => true, | |
'method' => 'POST', | |
'validateOnChange' => false, | |
'ajaxDataType' => 'application/x-www-form-urlencoded' | |
]); ?> | |
<?= $form->field($model, 'default_title') ?> | |
<?= $form->field($model, 'language_id')->dropDownList( | |
\yii\helpers\ArrayHelper::map(\common\models\ps1base\Language::find()->all(),'id','default_title'), | |
['prompt'=>'Choose...'] | |
); ?> | |
<?= $form->field($model, 'hostname')->input('url') ?> | |
<?= $form->field($model, 'color') ?> | |
<?= $form->field($model, 'icon_file_id') ?> | |
<?= $form->field($model, 'file_id') ?> | |
<?= Html::activeHiddenInput($model, 'user_id') ?> | |
<?= Html::activeHiddenInput($model, 'updated_at') ?> | |
<?= Html::activeHiddenInput($model, 'created_at') ?> | |
<div class="form-group"> | |
<?= Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-primary']) ?> | |
</div> | |
<?php ActiveForm::end(); ?> | |
</div><!-- _form_magazine --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment