SHARE
TWEET

_form.php

a guest Apr 24th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. use yii\helpers\Html;
  4. use yii\bootstrap\ActiveForm;
  5. use yii\web\JsExpression;
  6. use kartik\widgets\TimePicker;
  7. use yii\bootstrap4\Modal;
  8. use kartik\date\DatePicker;
  9. use trntv\filekit\widget\Upload;
  10. use kartik\widget\FileInput;
  11.  
  12. /* @var $this yii\web\View */
  13. /* @var $model backend\models\Event */
  14. /* @var $form yii\bootstrap\ActiveForm */
  15. ?>
  16.  
  17. <div class="event-form">
  18.  
  19.     <?php $form = ActiveForm::begin(['id' => 'event-form', 'options' => ['enctype' => 'multipart/form-data']]); ?>
  20.  
  21.     <?php echo $form->errorSummary($model); ?>
  22.  
  23.     <?php echo $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
  24.  
  25.     <?php echo $form->field($model, 'harga')->textInput() ?>
  26.  
  27.     <?= $form->field($model, 'url_gambar')->widget(
  28.     Upload::class,
  29.     [
  30.         'id' => 'inputgambar',
  31.         'url' => ['/file/storage/upload'],
  32.         'maxFileSize' => 5000000, // 5 MiB
  33.     ]);?>
  34.  
  35.     <?php echo $form->field($model, 'waktu')->widget(TimePicker::classname(), []); ?>
  36.  
  37.     <?php echo $form->field($model, 'tgl_mulai')->widget(DatePicker::classname(), [
  38.         'options' => ['placeholder' => 'Input tanggal mulai ...'],
  39.         'pluginOptions' => [
  40.             'autoclose'=>true
  41.         ]
  42.     ]); ?>
  43.  
  44.     <?php echo $form->field($model, 'tgl_akhir')->widget(DatePicker::classname(), [
  45.         'options' => ['placeholder' => 'Input tanggal berakhir ...'],
  46.         'pluginOptions' => [
  47.             'autoclose'=>true
  48.         ]
  49.     ]); ?>
  50.  
  51.     <?php echo $form->field($model, 'lokasi')->textInput(['maxlength' => true]) ?>
  52.  
  53.     <?php echo $form->field($model, 'get_point')->textInput() ?>
  54.  
  55.     <?php echo $form->field($model, 'artikel')->textInput() ?>
  56.  
  57.     <?php echo $form->field($model, 'jenis')->textInput(['maxlength' => true]) ?>
  58.  
  59.     <div class="form-group">
  60.         <?php echo Html::submitButton('<i class="fa fa-save"></i>&nbsp;&nbsp;' . translateText('Save'), ['class' => 'btn btn-success']) ?>
  61.     </div>
  62.  
  63.     <?php ActiveForm::end(); ?>
  64.  
  65. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top