You are here

function uc_catalog_buy_it_now_form in Ubercart 6.2

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

Form builder for uc_catalog_buy_it_now_form().

See also

uc_product_forms()

uc_catalog_buy_it_now_form_validate()

uc_catalog_buy_it_now_form_submit()

1 string reference to 'uc_catalog_buy_it_now_form'
uc_product_forms in uc_product/uc_product.module
Implements hook_forms().

File

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

Code

function uc_catalog_buy_it_now_form($form_state, $node) {
  $form = array();
  $form['#validate'][] = 'uc_catalog_buy_it_now_form_validate';
  $form['#submit'][] = 'uc_catalog_buy_it_now_form_submit';
  $form['nid'] = array(
    '#type' => 'hidden',
    '#value' => $node->nid,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => variable_get('uc_teaser_add_to_cart_text', t('Add to cart')),
    '#id' => 'edit-submit-' . $node->nid,
    '#attributes' => array(
      'class' => 'list-add-to-cart',
    ),
  );
  uc_form_alter($form, $form_state, __FUNCTION__);
  return $form;
}