You are here

function form_builder_wrappers in Form Builder 6

A #post_render callback to backport Drupal 7's #theme_wrappers.

This #after_build function can be added to any form element to make it process #form_builder_wrappers functions which act in the same way as Drupal 7's #theme_wrappers functions.

3 string references to 'form_builder_wrappers'
form_builder_field_render in includes/form_builder.admin.inc
Render a single field independent of other settings.
form_builder_preview in includes/form_builder.admin.inc
Form. Given a form array, present it for editing in a preview.
form_builder_pre_render in includes/form_builder.admin.inc
Take a form structure and add a prebuild function to every element.

File

./form_builder.module, line 342
form_builder.module Generic form building framework and user interface.

Code

function form_builder_wrappers($content, $elements) {
  if (isset($elements['#form_builder_wrappers'])) {
    foreach ($elements['#form_builder_wrappers'] as $theme_wrapper) {
      $content = theme($theme_wrapper, $elements, $content);
    }
  }
  return $content;
}