You are here

function commerce_wishlist_add_form in Commerce Wishlist 7.2

Same name and namespace in other branches
  1. 7.3 commerce_wishlist.module \commerce_wishlist_add_form()
  2. 7 commerce_wishlist.module \commerce_wishlist_add_form()

Form callback for add a new button of commerce_cart_add_to_cart_form()

1 call to commerce_wishlist_add_form()
commerce_wishlist_form_alter in ./commerce_wishlist.module
Implements hook_form_alter().

File

./commerce_wishlist.module, line 441
Provides the wishlist for use in Drupal Commerce.

Code

function commerce_wishlist_add_form() {
  $form['add_to_wishlist'] = array(
    '#type' => 'submit',
    '#value' => t('Add to Wishlist'),
    '#name' => 'commerce-wishlist-add-product',
    '#attributes' => array(
      'class' => array(
        'commerce-wishlist',
      ),
    ),
    '#validate' => array(
      'commerce_wishlist_add_form_validate',
    ),
    '#submit' => array(
      'commerce_wishlist_add_form_submit',
    ),
  );
  return $form;
}