I installed base cart module and I need to totally overwrite the submit handler of one of its forms and not to execute its default functionality at all. From what I searched, I wrote this code in template.php
:
function ThemeName_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'order_node_form'){
$form['#submit'] = 'submit';
$form['#validate'] = '';
}
}
function submit() {
return "submit";
}
But it is not working. Is it possible to do this in template.php
or I need to build a module to do this? or the problem is from anything else?
Thanks