function field_group_pre_render_multipage_group in Field Group 7
Same name and namespace in other branches
- 7.2 field_group.module \field_group_pre_render_multipage_group()
Implements field_group_pre_render_<format-type>. Format type: Multipage group.
Parameters
$element The field group form element.:
$group The Field group object prepared for pre_render.:
$form The root element or form.:
File
- ./
field_group.module, line 933 - Fieldgroup module.
Code
function field_group_pre_render_multipage_group(&$element, &$group, &$form) {
$multipage_element = array(
'#type' => 'multipage',
'#theme_wrappers' => array(
'multipage',
),
'#prefix' => '<div class="field-group-' . $group->format_type . '-wrapper ' . $group->classes . '">',
'#suffix' => '</div>',
);
$element += $multipage_element;
$move_additional = isset($group->format_settings['instance_settings']['move_additional']) ? $group->format_settings['instance_settings']['move_additional'] && isset($form['additional_settings']) : isset($form['additional_settings']);
$move_button = isset($group->format_settings['instance_settings']['move_button']) ? $group->format_settings['instance_settings']['move_button'] : 0;
drupal_add_js(array(
'field_group' => array(
'multipage_move_submit' => (bool) $move_button,
'multipage_move_additional' => (bool) $move_additional,
),
), 'setting');
}