function finder_text_element in Finder 7.2
Element callback.
1 string reference to 'finder_text_element'
File
- plugins/
element_handler/ text.inc, line 113 - The finder text element handler plugin.
Code
function finder_text_element($element, &$form_element, $form_state) {
$finder = $element->finder;
$properties = array();
if ($finder
->esetting($element, 'rows')) {
$form_element['#type'] = 'textarea';
$properties[] = 'rows';
}
else {
$form_element['#type'] = 'textfield';
$properties[] = 'maxlength';
$properties[] = 'minlength';
$properties[] = 'size';
}
foreach ($properties as $property) {
$value = $finder
->esetting($element, $property);
if ($value) {
$form_element['#' . $property] = $value;
}
}
$form_element['#element_validate'][] = 'finder_text_element_validate';
}