You are here

function uc_product_form_alter in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_product/uc_product.module \uc_product_form_alter()
  2. 7.3 uc_product/uc_product.module \uc_product_form_alter()

Implements hook_form_alter().

See also

uc_product_save_continue_submit()

File

uc_product/uc_product.module, line 854
The product module for Ubercart.

Code

function uc_product_form_alter(&$form, $form_state, $form_id) {

  // Add a button to product node forms to continue editing after saving.
  if (uc_product_is_product_form($form)) {
    $form['buttons']['save_continue'] = array(
      '#type' => 'submit',
      '#value' => t('Save and continue'),
      '#weight' => 7,
      '#submit' => array(
        'node_form_submit',
        'uc_product_save_continue_submit',
      ),
    );
  }
}