public function open(array $options = []) { if (array_key_exists('model', $options)) { PkForm::setModel($options['model']); unset($options['model']); } return parent::open($options); }
$diagsf->hidden('id'); //$diagsf->text('diagnosiscode_id'); $diagsf->select('diagnosiscode_id', DiagnosisRef::getSelectList(true, true)); $out[] = PkForm::model($client); $infoout->wrap(['value' => PkForm::text('fname', null, ['placeholder' => 'First Name']), 'raw' => true, 'label' => 'Client First Name', 'labelAttributes' => 'block tpm-label', 'valueAttributes' => 'block tpm-value', 'wrapperAttributes' => 'col-xs-4 tpm-wrapper']); #Note arguement 'true' to ::getRefArr(true) - prepends null=>'None' to array $infoout->wrap(['value' => PkForm::select('insurance_status_id', App\References\InsuranceStatusRef::getRefArr(true), null), 'raw' => true, 'label' => 'Insurance Status', 'labelAttributes' => 'block tpm-label', 'valueAttributes' => 'block tpm-value', 'wrapperAttributes' => 'col-xs-4 tpm-wrapper']); $out[] = $infoout; $out[] = $diagsf; #Can put sections/containers together in a row $out->div(RENDEROPEN, 'row'); $out->rawdiv($diagwrapper, 'col-sm-6'); $out->rawdiv($payout, 'col-sm-6'); $out->RENDERCLOSE(); $out[] = PkForm::button('Submit', ['type' => 'submit', 'name' => 'submit', 'value' => 'submit', 'class' => 'pkmvc-button block fullwidth', 'title' => "Save Changes"]); $out[] = PkForm::close(); ?> @extends('app') @section('content') <div class='template type'> <h1>The Client Edit Template</h1> <?php echo $out; ?> </div> @stop