Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nodebasket_nodeviewform($form_state, $node) {
- $form['#action'] = url('basket/'. $node->nid .'/add', $options = array(
- 'query' => drupal_get_destination(),
- ));
- $form['#id'] = 'formBasketButton_'. $node->nid;
- $form['#attributes'] = array(
- 'class' => 'add-to-cart-form',
- );
- $form['text']=array(
- '#type' => 'text',
- '#value' => '1',
- '#attributes' => array(
- 'class' => 'count',
- 'id' => 'BasketCount_'. $node->nid,
- 'maxlength'=>'4',
- ),
- );
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Add to basket'),
- '#attributes' => array(
- 'class' => 'basket-actions',
- 'id' => 'BasketButton_'. $node->nid,
- ),
- );
- return $form;
- }
Add Comment
Please, Sign In to add comment