function modalframe_form_after_build_recursive in Modal Frame API 7
Same name and namespace in other branches
- 6 modalframe.module \modalframe_form_after_build_recursive()
Find form elements with submit handlers recursively.
1 call to modalframe_form_after_build_recursive()
- modalframe_form_after_build in ./
modalframe.module - Form after build callback.
File
- ./
modalframe.module, line 217 - Provides an API to render an iframe within a modal dialog based on the jQuery UI Dialog plugin.
Code
function modalframe_form_after_build_recursive(&$elements, &$form_state) {
// Recurse through all children elements.
foreach (element_children($elements) as $key) {
if (isset($elements[$key]) && $elements[$key]) {
modalframe_form_after_build_recursive($elements[$key], $form_state);
}
}
// If this element has submit handlers, then append our own.
if (isset($elements['#submit'])) {
$elements['#submit'][] = 'modalframe_form_submit';
}
}