<?php echo $form->field($model, 'rubric')->textarea(['rows' => 3]); ?> <?php echo $form->field($model, 'Other_instructions')->textarea(['rows' => 2]); ?> <?php echo '<label class="control-label">Add Attachments</label>'; echo $form->field($model, 'files')->widget(FileInput::classname(), ['options' => ['multiple' => true]]); ?> <?php echo $form->field($model, 'status_id')->dropDownList(ArrayHelper::map(Tblorderstatus::find()->all(), 'status_id', 'status'), ['prompt' => 'Select Status']); ?> <?php echo '<label>Date and Time Ordered</label>'; echo DateTimePicker::widget(['name' => 'date_ordered', 'value' => $model->date_ordered, 'options' => ['required' => true], 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'startDate' => '01-Mar-2014 12:00 AM', 'todayHighlight' => true]]); ?> <?php echo '<label>Date and Time Expected</label>'; echo DateTimePicker::widget(['name' => 'date_expected', 'value' => $model->date_expected, 'options' => ['required' => true], 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'startDate' => '01-Mar-2014 12:00 AM', 'todayHighlight' => true]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
/** * Finds the Tblorderstatus model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Tblorderstatus the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Tblorderstatus::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * @return \yii\db\ActiveQuery */ public function getStatus() { return $this->hasOne(Tblorderstatus::className(), ['status_id' => 'status_id']); }