theme_multipage_form_example_node_form

Versions
4.7 – 6
theme_multipage_form_example_node_form($form)

Code

developer/examples/multipage_form_example.module, line 159

<?php
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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.