[development] Value of submit button on insert

Dan Robinson dan at drob.org
Fri Aug 29 00:10:12 UTC 2008


Folks,

I've written a module and used hook_form to create a form.  I want the
"Save" button to read "Print Registration Form", not "Save".  If I put
my own button in:

    $form['#submit'] = array('mymodule_process_registration');
    $form['#arg'] = $node;
    $form['#redirect'] = 'registration/complete';
   
    $form['submit'] = array(
        '#type' => 'submit',
        '#value' => t('Print Registration Form'),
        '#weight' => -2,
    )

Then the node won't get inserted because the 'op' is set to 'Print
Registration Form' instead of 'Save'.  I've looked at using
hook_validate and hook_nodeapi but no joy there.  Any suggestions?

Thanks,

Dan


More information about the development mailing list