diff --git a/models/Form.php b/models/Form.php index 53549a0..020716a 100644 --- a/models/Form.php +++ b/models/Form.php @@ -11,6 +11,7 @@ class Form public $request_method; public $request_url; public $before_fields; + public $after_fields; public $buttons_extra; private $fields = []; private $data = []; @@ -26,6 +27,7 @@ class Form $this->fields = !empty($options['fields']) ? $options['fields'] : []; $this->buttons_extra = !empty($options['buttons_extra']) ? $options['buttons_extra'] : null; $this->before_fields = !empty($options['before_fields']) ? $options['before_fields'] : null; + $this->after_fields = !empty($options['after_fields']) ? $options['after_fields'] : null; $this->submit_caption = !empty($options['submit_caption']) ? $options['submit_caption'] : 'Save information'; $this->trim_inputs = !empty($options['trim_inputs']); } diff --git a/templates/FormView.php b/templates/FormView.php index ebc5321..7e2bc1a 100644 --- a/templates/FormView.php +++ b/templates/FormView.php @@ -42,6 +42,9 @@ class FormView extends SubTemplate $this->renderField($field_id, $field); } + if (isset($this->form->after_fields)) + echo $this->form->after_fields; + echo '