theme_multipage_form_example_node_form

5 multipage_form_example.module theme_multipage_form_example_node_form($form)

File

developer/examples/multipage_form_example.module, line 159

Code

function theme_multipage_form_example_node_form($form) {
  $content = '';

  if (in_array($form['page']['#value'], array(3, 4))) {
    $content .= '<p>' . t('Your favorite person is %person, and they %like gummi bears.', array('%person' => check_plain($form['person']['fav_person']['#value']), '%like' => ($form['person']['fav_gummi']['#value'] ? t('like') : t('don\'t like')))) . '</p>';
  }

  if (in_array($form['page']['#value'], array(4))) {
    $content .= '<p>' . t('Your favorite color is %color, and your favorite number is %number.', array('%color' => check_plain($form['fav_color']['#value']), '%number' => check_plain($form['fav_number']['#value'])));
  }

  foreach (element_children($form) as $key) {
    $content .= form_render($form[$key]);
  }
  return $content;
}
Login or register to post comments