function _webform_edit_hidden_product in Ubercart Webform Integration 6
Same name and namespace in other branches
- 7.3 components/hidden_product.inc \_webform_edit_hidden_product()
- 7.2 components/hidden_product.inc \_webform_edit_hidden_product()
Implements _webform_edit_component().
File
- components/
hidden_product.inc, line 37 - Webform module hidden component.
Code
function _webform_edit_hidden_product($component) {
$form = array();
$form['value'] = array(
'#type' => 'textfield',
'#title' => t('Quantity'),
'#default_value' => $component['value'],
'#description' => t('The quantity of product.'),
'#size' => 5,
'#maxlength' => 10,
'#weight' => 0,
'#required' => TRUE,
);
$form['extra']['hidden_product'] = array(
'#type' => 'textfield',
'#title' => t('Hidden Product'),
'#default_value' => $component['extra']['hidden_product'],
'#weight' => -3,
'#size' => 60,
'#description' => t('Please select a product. Only products that do not contain attributes will be displayed.'),
'#autocomplete_path' => 'uc_webform/autocomplete',
);
$form['extra']['description'] = array();
// Hide the description box.
$form['display'] = array(
'#type' => 'markup',
);
// Hide the display options.
return $form;
}