You are here

function webform_component_feature in Webform 7.4

Same name and namespace in other branches
  1. 6.3 includes/webform.components.inc \webform_component_feature()
  2. 7.3 includes/webform.components.inc \webform_component_feature()

Check if a component has a particular feature.

See also

hook_webform_component_info()

17 calls to webform_component_feature()
theme_webform_element_text in ./webform.module
Output a form element in plain text format.
webform_components_form in includes/webform.components.inc
The table-based listing of all components for this webform.
webform_component_clone in includes/webform.components.inc
Recursively insert components into the database.
webform_component_delete_form in includes/webform.components.inc
Form to confirm deletion of a component.
webform_component_edit_form in includes/webform.components.inc
Form to configure a webform component.

... See full list

File

includes/webform.components.inc, line 988
Webform module component handling.

Code

function webform_component_feature($type, $feature) {
  $components = webform_components();
  $defaults = array(
    'analysis' => TRUE,
    'csv' => TRUE,
    'default_value' => TRUE,
    'description' => TRUE,
    'email' => TRUE,
    'email_address' => FALSE,
    'email_name' => FALSE,
    'required' => TRUE,
    'stores_data' => TRUE,
    'title' => TRUE,
    'title_display' => TRUE,
    'title_inline' => TRUE,
    'title_internal' => FALSE,
    'conditional' => TRUE,
    'conditional_action_set' => FALSE,
    'spam_analysis' => FALSE,
    'group' => FALSE,
    'attachment' => FALSE,
    'private' => TRUE,
    'placeholder' => FALSE,
    'wrapper_classes' => TRUE,
    'css_classes' => TRUE,
    'views_range' => FALSE,
  );
  return isset($components[$type]['features'][$feature]) ? $components[$type]['features'][$feature] : !empty($defaults[$feature]);
}