1 reply [Last post]
glennnz's picture
Offline
Joined: 01/20/2009
Juice: 451
Was this information Helpful?

Hi

I'm using uc_node_checkout, and want to add two buttons to the node view, one to complete registration (i.e. go to shopping cart), and one to add another uc_node_checkout product.

How do I add actions to buttons on a node form?

I can display the buttons fine with:

<?php
function registration_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch (
$op) {
    case
'view':
      if (
$node->type == 'tournament_registration' && $node->field_status['0']['value'] != 1) {
       
$node->content['complete_registration_button'] = array(
         
'#type' => 'button',
         
'#name' => 'complete_registration',
         
'#value' => 'Complete registration',
         
'#weight' => -31,
//          '#redirect' => 'cart',
       
);
       
$node->content['register_another_button'] = array(
         
'#type' => 'button',
         
'#name' => 'register_another',
         
'#value' => 'Register Another Player',
         
'#weight' => -30,
//          '#redirect' => 'node/add/'. $node->type,
       
);
      }
  }
}
?>

The '#redirect' does nothing, how do I add actions to these buttons?

Thanks

Glenn

glennnz's picture
Offline
Joined: 01/20/2009
Juice: 451
Bump Thanks Glenn

Bump

Thanks

Glenn