function _formdefaults_hide_recursive in Form Defaults 6.2
Same name and namespace in other branches
- 8 formdefaults.module \_formdefaults_hide_recursive()
- 5.3 formdefaults.module \_formdefaults_hide_recursive()
- 7 formdefaults.module \_formdefaults_hide_recursive()
Recursively iterate through all form elements and hide all children.
Parameters
array $form_element:
1 call to _formdefaults_hide_recursive()
- formdefaults_alterform in ./
formdefaults.module - Alters the form based on the form replacement items passed.
File
- ./
formdefaults.module, line 219
Code
function _formdefaults_hide_recursive(&$form_element) {
// recursively iterate through all children and hide them.
foreach ((array) $form_element as $key => $field) {
if (strpos($key, '#') === FALSE) {
_formdefaults_hide_recursive($form_element[$key]);
}
}
_formdefaults_hide_field($form_element);
}