Skip navigation
Help

uc_product_feature_add_form

6 uc_product.admin.inc uc_product_feature_add_form()
7 uc_product.admin.inc uc_product_feature_add_form($form, &$form_state, $node)

Adds the form for adding a product feature to the features tab.

See also

uc_product_feature_add_form_submit()

theme_uc_product_feature_add_form()

Related topics

2 string references to 'uc_product_feature_add_form'

File

ubercart/uc_product/uc_product.admin.inc, line 206
Product administration menu items.

Code

function uc_product_feature_add_form($form, &$form_state, $node) {
  foreach (module_invoke_all('uc_product_feature') as $feature) {
    $options[$feature['id']] = $feature['title'];
  }
  ksort($options);

  $form['feature'] = array(
    '#type' => 'select', 
    '#title' => t('Add a new feature'), 
    '#options' => $options,
  );

  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit', 
    '#value' => t('Add'),
  );

  return $form;
}