You are here

function google_tag_form_element_type in GoogleTagManager 7

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

Converts variable type to form element type.

Parameters

string $type: Variable type.

Return value

string Form element type.

1 call to google_tag_form_element_type()
google_tag_form_elements in includes/admin.inc
Returns form elements from variable definitions.

File

includes/admin.inc, line 119
Contains the administrative page and form callbacks.

Code

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