You are here

function maxlength_recursive in Maxlength 6.2

Finds all the elements in the form that request #max_length_properties behaviour and respond.

1 call to maxlength_recursive()
maxlength_after_build in ./maxlength.module
Finds all the elements in the form that request #max_length_properties behaviour and respond.

File

./maxlength.module, line 124
Enables a max length countdown on node body, title and CCK textfields.

Code

function maxlength_recursive(&$elements) {
  foreach (element_children($elements) as $key) {
    if (isset($elements[$key]) && $elements[$key]) {
      if (!empty($elements[$key]['#max_length_properties'])) {
        _maxlength_format_element($elements[$key]);
      }
      maxlength_recursive($elements[$key]);
    }
  }
}