You are here

function commerce_product_line_item_add_form in Commerce Core 7

Returns the elements necessary to add a product line item through a line item manager widget.

File

modules/product_reference/commerce_product_reference.module, line 1326
Defines a field type for referencing products from other entities.

Code

function commerce_product_line_item_add_form($element, &$form_state) {
  $form = array();
  $form['product_sku'] = array(
    '#type' => 'textfield',
    '#title' => t('Product SKU'),
    '#description' => t('Enter the SKU of the product to add to the order.'),
    '#autocomplete_path' => 'commerce_product/autocomplete/commerce_product/line_item_product_selector/product',
    '#size' => 60,
    '#maxlength' => 255,
  );
  return $form;
}