From 679c8a008661a12f78a209b113efd8a73bac9bcb Mon Sep 17 00:00:00 2001 From: gkweb Date: Tue, 10 May 2016 18:00:17 +1000 Subject: [PATCH] Updated form helper to ommit button when form->end label set to false --- core/helpers/mvc_form_helper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/helpers/mvc_form_helper.php b/core/helpers/mvc_form_helper.php index 54eade8..9bdc598 100644 --- a/core/helpers/mvc_form_helper.php +++ b/core/helpers/mvc_form_helper.php @@ -32,8 +32,14 @@ public function create($model_name, $options=array()) { } public function end($label='Submit') { - $html = '
'; + $html = ""; + // Allows the ommission of Submit button from end of form if $label == false. Useful for using custom submit buttons with more specific stylings etc.. + if ($label) { + $html = '
'; + } + $html .= ''; + return $html; }