You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

<?php
namespace App\Forms;
use App\Models\Project;
use Kris\LaravelFormBuilder\Form;
use Kris\LaravelFormBuilder\Field;
class AskSubmitForm extends Form
{
public function buildForm()
{
$this->add("project_id", Field::HIDDEN, ["label" => "所属项目/医院", "rules" => "required"]);
$this->add("visit", Field::TEXT, ["label" => "拜访人员", "rules" => "required"]);
$this->add("date", Field::DATE, ["label" => "考核日期", "rules" => "required"]);
$this->add("department", Field::DATE, ["label" => "科室", "rules" => "required"]);
$this->add("ask[]", Field::SELECT, ["label" => "遵守医院各项规章制度,维持秩序。", "choices" => [
"20" => "满意-20",
"19" => "满意-19",
"18" => "满意18",
"17" => "较满意-17",
"16" => "较满意-16",
"15" => "较满意-15",
"14" => "开放",
]]);
$this->add("tip", Field::TEXTAREA, ["label" => "建议"]);
$this->add('buttons', 'buttongroup', ["splitted" => true, "buttons" => [
["label" => "保存", "attr" => ["class" => "btn btn-primary mr-1", "type" => "submit"]],
["label" => "返回", "attr" => ["class" => "btn btn-light btn-back", "type" => "button"]]
]]);
}
}