You are here

function webform_component_feature in Webform 6.3

Same name and namespace in other branches
  1. 7.4 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()

13 calls to webform_component_feature()
theme_webform_components_form in includes/webform.components.inc
Theme the node components form. Use a table to organize the components.
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.

... See full list

File

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

Code

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