Skip to content

Commit

Permalink
Updated form helper to ommit button when form->end label set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
gkweb committed May 10, 2016
1 parent 32e5e98 commit 679c8a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/helpers/mvc_form_helper.php
Expand Up @@ -32,8 +32,14 @@ public function create($model_name, $options=array()) {
}

public function end($label='Submit') {
$html = '<div><input type="submit" value="'.$this->esc_attr($label).'" /></div>';
$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 = '<div><input type="submit" value="'.$this->esc_attr($label).'" /></div>';
}

$html .= '</form>';

return $html;
}

Expand Down

0 comments on commit 679c8a0

Please sign in to comment.