function form_type_textfield_value

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 form.inc form_type_textfield_value($element, $input = FALSE)
cle7 form.inc form_type_textfield_value($element, $input = FALSE)
elmsmedia7 form.inc form_type_textfield_value($element, $input = FALSE)
icor7 form.inc form_type_textfield_value($element, $input = FALSE)
meedjum_blog7 form.inc form_type_textfield_value($element, $input = FALSE)
mooc7 form.inc form_type_textfield_value($element, $input = FALSE)

Determines the value for a textfield form element.

Parameters

$element: The form element whose value is being populated.

$input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned.

Return value

The data that will appear in the $element_state['values'] collection for this element. Return nothing to use the default.

Related topics

1 call to form_type_textfield_value()
color_palette_color_value in modules/color/color.module
Determines the value for a palette color field.

File

includes/form.inc, line 2511
Functions for form and batch generation and processing.

Code

function form_type_textfield_value($element, $input = FALSE) {
  if ($input !== FALSE && $input !== NULL) {
    // Equate $input to the form value to ensure it's marked for
    // validation.
    return str_replace(array("\r", "\n"), '', $input);
  }
}