You are here

function commerce_webform_element_info in Commerce Webform 8

Same name and namespace in other branches
  1. 7.2 commerce_webform.module \commerce_webform_element_info()

Implements hook_element_info().

Specify the productfield as its own element type. This allows us to combine the product selection and quantity into a single fieldapi element which allows it to work with conditional webform.

File

./commerce_webform.module, line 763
Commerce Webform module file

Code

function commerce_webform_element_info() {
  $elements['webform_productfield'] = array(
    '#input' => TRUE,
    '#description' => '',
    '#name' => '',
    '#multiple' => FALSE,
    '#productids' => array(),
    '#aslist' => FALSE,
    '#choose_quantity' => FALSE,
    '#process' => array(
      'commerce_webform_productfield_expand',
    ),
  );
  return $elements;
}