Skip navigation
Help

theme_uc_cart_view_form

6 uc_cart.module theme_uc_cart_view_form($form)
7 uc_cart.theme.inc theme_uc_cart_view_form($variables)

Themes the uc_cart_view_form().

Outputs a hidden copy of the update cart button first, so pressing Enter updates the cart instead of removing an item.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

See also

uc_cart_view_form()

Related topics

File

ubercart/uc_cart/uc_cart.theme.inc, line 221
Theme functions for the uc_cart module.

Code

function theme_uc_cart_view_form($variables) {
  $form = &$variables['form'];

  $output = '<div class="uc-default-submit">';
  $output .= drupal_render($form['actions']['update']);
  $output .= '</div>';
  $form['actions']['update']['#printed'] = FALSE;

  $output .= drupal_render_children($form);

  return $output;
}