You are here

function google_tag_form_element_type in GoogleTagManager 7.2

Same name in this branch
  1. 7.2 includes/form/container.inc \google_tag_form_element_type()
  2. 7.2 includes/form/settings.inc \google_tag_form_element_type()
Same name and namespace in other branches
  1. 7 includes/admin.inc \google_tag_form_element_type()

Converts variable type to form element type.

Parameters

string $type: Variable type.

Return value

string Form element type.

2 calls to google_tag_form_element_type()
google_tag_form_elements in includes/form/container.inc
Returns form elements from variable definitions.
google_tag_form_elements in includes/form/settings.inc
Returns form elements from variable definitions.

File

includes/form/container.inc, line 141
Contains the container form callbacks.

Code

function google_tag_form_element_type($type) {
  static $keys = array(
    'string' => 'textfield',
    'select' => 'radios',
    'text' => 'textarea',
    'options' => 'checkboxes',
    'boolean' => 'checkbox',
    'weight' => 'weight',
  );
  return isset($keys[$type]) ? $keys[$type] : 'textfield';
}