表单功能完善

This commit is contained in:
2017-10-11 20:04:26 +08:00
parent 1517906f7b
commit 805697d643
4 changed files with 650 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ class Form extends Front {
public function _initialize() {
parent::_initialize();
$model_name = $this->request->param('model');
$this->form = db('Form')->where('name', $model_name)->find();
$this->model = M($model_name, 'form');
}
@@ -53,6 +54,13 @@ class Form extends Front {
return $this->error('提交失败!');
}
}else{
$map['form_id'] = $this->form['id'];
$attr = model('FormAttr')->getFieldlist($map);
$data = array(
'attr' => $attr
);
$this->assign($data);
return $this->fetch();
}
}