[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/webform/templates/ -> webform-form.tpl.php (source)

   1  <?php
   2  // $Id: webform-form.tpl.php,v 1.1 2009/05/22 03:11:18 quicksketch Exp $
   3  
   4  /**
   5   * @file
   6   * Customize the display of a complete webform.
   7   *
   8   * This file may be renamed "webform-form-[nid].tpl.php" to target a specific
   9   * webform on your site. Or you can leave it "webform-form.tpl.php" to affect
  10   * all webforms on your site.
  11   *
  12   * Available variables:
  13   * - $form: The complete form array.
  14   * - $nid: The node ID of the Webform.
  15   *
  16   * The $form array contains two main pieces:
  17   * - $form['submitted']: The main content of the user-created form.
  18   * - $form['details']: Internal information stored by Webform.
  19   */
  20  ?>
  21  <?php
  22    // If editing or viewing submissions, display the navigation at the top.
  23    if (isset($form['submission_info']) || isset($form['navigation'])) {
  24      print drupal_render($form['navigation']);
  25      print drupal_render($form['submission_info']);
  26    }
  27  
  28    // Print out the main part of the form.
  29    // Feel free to break this up and move the pieces within the array.
  30    print drupal_render($form['submitted']);
  31  
  32    // Always print out the entire $form. This renders the remaining pieces of the
  33    // form that haven't yet been rendered above.
  34    print drupal_render($form);
  35  
  36    // Print out the navigation again at the bottom.
  37    if (isset($form['submission_info']) || isset($form['navigation'])) {
  38      unset($form['navigation']['#printed']);
  39      print drupal_render($form['navigation']);
  40    }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7