function webform_autocomplete_form_builder_types in Webform Autocomplete 7
Implements hook_form_builder_types().
File
- ./
webform_autocomplete.module, line 86
Code
function webform_autocomplete_form_builder_types() {
drupal_add_css(drupal_get_path('module', 'webform_autocomplete') . '/autocomplete.css');
$fields = array(
'autocomplete' => array(
'title' => t('Autocomplete'),
'weight' => -30,
'properties' => array(
'title',
'description',
'field_prefix',
'field_suffix',
'default_value',
'required',
'size',
'maxlength',
'disabled',
'autocomplete_items',
'autocomplete_existing',
'autocomplete_match_rule',
'autocomplete_restrict',
'unique',
),
),
);
if (function_exists('_form_builder_webform_default')) {
$fields['autocomplete']['default'] = _form_builder_webform_default('autocomplete');
}
$fields['autocomplete']['default']['#title'] = t('New autocomplete');
// Return the array of supported fields, with a key for the form type that
// these fields apply to.
return array(
'webform' => $fields,
);
}