Customizing form submit button.
Permalink
I'm trying to change the submit input button in the form helper but I'm having trouble.
I've have form.php in /helpers and the following code.
C5 is still calling the submit function from the original form helper instead of the custom one.
Thanks for the help!
I've have form.php in /helpers and the following code.
C5 is still calling the submit function from the original form helper instead of the custom one.
Thanks for the help!
class SiteFormHelper extends FormHelper{ public function submit($name, $value, $fields = array(), $additionalClasses='') { $_fields = ''; if (isset($fields['class'])) { $additionalClasses = $fields['class']; unset($fields['class']); } foreach($fields as $key => $fieldvalue) { $_fields .= $key . '="' . $fieldvalue . '" '; } $str = '<button type="submit" class="ccm-input-submit submidBtn '.$additionalClasses.'" id="' . $name . '" name="' . $name . '" value="' . $value . '" ' . $_fields . ' /><span>' . $value . '</span></button>'; return $str; } }
where have you put the custom code?