root / drupal7 / sites / all / modules / webform / templates / webform-form.tpl.php @ e9f59ce0
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Customize the display of a complete webform.
|
6 |
*
|
7 |
* This file may be renamed "webform-form-[nid].tpl.php" to target a specific
|
8 |
* webform on your site. Or you can leave it "webform-form.tpl.php" to affect
|
9 |
* all webforms on your site.
|
10 |
*
|
11 |
* Available variables:
|
12 |
* - $form: The complete form array.
|
13 |
* - $nid: The node ID of the Webform.
|
14 |
*
|
15 |
* The $form array contains two main pieces:
|
16 |
* - $form['submitted']: The main content of the user-created form.
|
17 |
* - $form['details']: Internal information stored by Webform.
|
18 |
*
|
19 |
* If a preview is enabled, these keys will be available on the preview page:
|
20 |
* - $form['preview_message']: The preview message renderable.
|
21 |
* - $form['preview']: A renderable representing the entire submission preview.
|
22 |
*/
|
23 |
?>
|
24 |
<?php
|
25 |
// Print out the progress bar at the top of the page
|
26 |
print drupal_render($form['progressbar']); |
27 |
|
28 |
// Print out the preview message if on the preview page.
|
29 |
if (isset($form['preview_message'])) { |
30 |
print '<div class="messages warning">'; |
31 |
print drupal_render($form['preview_message']); |
32 |
print '</div>'; |
33 |
} |
34 |
|
35 |
// Print out the main part of the form.
|
36 |
// Feel free to break this up and move the pieces within the array.
|
37 |
print drupal_render($form['submitted']); |
38 |
|
39 |
// Always print out the entire $form. This renders the remaining pieces of the
|
40 |
// form that haven't yet been rendered above (buttons, hidden elements, etc).
|
41 |
print drupal_render_children($form); |