You are here

function globallink_form_alter in GlobalLink Connect for Drupal 7.7

Implements hook_form_alter().

This will add the "Add to Cart" button in node edit page.

File

./globallink.module, line 1837
GlobalLink translation module.

Code

function globallink_form_alter(&$form, &$form_state, $form_id) {
  if (arg(0) == GLOBALLINK_ENTITY_TYPE_NODE && arg(2) == 'edit') {
    $form['actions']['add_to_globallink_cart'] = array(
      '#type' => 'submit',
      '#value' => t('Add to Globallink Submission'),
      '#access' => TRUE,
      '#weight' => 55,
      '#submit' => array(
        'add_to_globallink_cart_submit',
      ),
      '#limit_validation_errors' => array(),
    );
  }
}