You are here

function variable_form_element_unknown in Variable 7

Same name and namespace in other branches
  1. 7.2 variable.form.inc \variable_form_element_unknown()

Build form element for unknown variable.

This is not an editable form element but a form item.

1 string reference to 'variable_form_element_unknown'
variable_variable_type_info in ./variable.variable.inc
Implements hook_variable_type_info().

File

./variable.form.inc, line 107
Variable API module. Form library.

Code

function variable_form_element_unknown($variable, $options = array()) {
  $variable += array(
    'element' => array(),
    'title' => '',
    'description' => '',
  );
  $type = variable_get_type($variable['type']) + array(
    'element' => array(),
  );
  $element = $variable['element'] + array(
    '#title' => $variable['title'],
    '#description' => $variable['description'],
    '#markup' => variable_format_value($variable, $options),
  ) + $type['element'];
  return $element;
}