Permalink
Browse files

Added the webform module

  • Loading branch information...
shrop committed Jan 16, 2013
1 parent 225e14b commit 2be4e0d55aa26cb9d75a86792e310766755c46b7
Showing with 17,891 additions and 0 deletions.
  1. +37 −0 www/sites/all/modules/webform/CHANGELOG.txt
  2. +339 −0 www/sites/all/modules/webform/LICENSE.txt
  3. +41 −0 www/sites/all/modules/webform/README.txt
  4. +115 −0 www/sites/all/modules/webform/THEMING.txt
  5. +433 −0 www/sites/all/modules/webform/components/date.inc
  6. +285 −0 www/sites/all/modules/webform/components/email.inc
  7. +100 −0 www/sites/all/modules/webform/components/fieldset.inc
  8. +531 −0 www/sites/all/modules/webform/components/file.inc
  9. +428 −0 www/sites/all/modules/webform/components/grid.inc
  10. +179 −0 www/sites/all/modules/webform/components/hidden.inc
  11. +80 −0 www/sites/all/modules/webform/components/markup.inc
  12. +704 −0 www/sites/all/modules/webform/components/number.inc
  13. +101 −0 www/sites/all/modules/webform/components/pagebreak.inc
  14. +981 −0 www/sites/all/modules/webform/components/select.inc
  15. +217 −0 www/sites/all/modules/webform/components/textarea.inc
  16. +254 −0 www/sites/all/modules/webform/components/textfield.inc
  17. +430 −0 www/sites/all/modules/webform/components/time.inc
  18. +119 −0 www/sites/all/modules/webform/css/webform-admin.css
  19. +30 −0 www/sites/all/modules/webform/css/webform.css
  20. BIN www/sites/all/modules/webform/images/calendar.png
  21. +297 −0 www/sites/all/modules/webform/includes/webform.admin.inc
  22. +1,100 −0 www/sites/all/modules/webform/includes/webform.components.inc
  23. +578 −0 www/sites/all/modules/webform/includes/webform.emails.inc
  24. +170 −0 www/sites/all/modules/webform/includes/webform.export.inc
  25. +132 −0 www/sites/all/modules/webform/includes/webform.options.inc
  26. +417 −0 www/sites/all/modules/webform/includes/webform.pages.inc
  27. +1,005 −0 www/sites/all/modules/webform/includes/webform.report.inc
  28. +925 −0 www/sites/all/modules/webform/includes/webform.submissions.inc
  29. +56 −0 www/sites/all/modules/webform/js/select-admin.js
  30. +119 −0 www/sites/all/modules/webform/js/webform-admin.js
  31. +80 −0 www/sites/all/modules/webform/js/webform.js
  32. +8 −0 www/sites/all/modules/webform/templates/webform-calendar.tpl.php
  33. +29 −0 www/sites/all/modules/webform/templates/webform-confirmation.tpl.php
  34. +27 −0 www/sites/all/modules/webform/templates/webform-form.tpl.php
  35. +36 −0 www/sites/all/modules/webform/templates/webform-mail.tpl.php
  36. +35 −0 www/sites/all/modules/webform/templates/webform-results-submissions.tpl.php
  37. +24 −0 www/sites/all/modules/webform/templates/webform-submission-information.tpl.php
  38. +30 −0 www/sites/all/modules/webform/templates/webform-submission-navigation.tpl.php
  39. +35 −0 www/sites/all/modules/webform/templates/webform-submission-page.tpl.php
  40. +19 −0 www/sites/all/modules/webform/templates/webform-submission.tpl.php
  41. +37 −0 www/sites/all/modules/webform/tests/components.test
  42. +67 −0 www/sites/all/modules/webform/tests/permissions.test
  43. +174 −0 www/sites/all/modules/webform/tests/submission.test
  44. +808 −0 www/sites/all/modules/webform/tests/webform.test
  45. +308 −0 www/sites/all/modules/webform/views/webform.views.inc
  46. +42 −0 www/sites/all/modules/webform/views/webform_handler_field_form_body.inc
  47. +18 −0 www/sites/all/modules/webform/views/webform_handler_field_is_draft.inc
  48. +30 −0 www/sites/all/modules/webform/views/webform_handler_field_node_link_edit.inc
  49. +30 −0 www/sites/all/modules/webform/views/webform_handler_field_node_link_results.inc
  50. +60 −0 www/sites/all/modules/webform/views/webform_handler_field_submission_count.inc
  51. +100 −0 www/sites/all/modules/webform/views/webform_handler_field_submission_link.inc
  52. +38 −0 www/sites/all/modules/webform/views/webform_handler_field_webform_status.inc
  53. +25 −0 www/sites/all/modules/webform/views/webform_handler_filter_is_draft.inc
  54. +15 −0 www/sites/all/modules/webform/views/webform_handler_filter_webform_status.inc
  55. +858 −0 www/sites/all/modules/webform/webform.api.php
  56. +32 −0 www/sites/all/modules/webform/webform.info
  57. +833 −0 www/sites/all/modules/webform/webform.install
  58. +3,890 −0 www/sites/all/modules/webform/webform.module
@@ -0,0 +1,37 @@
+Webform 2.x Changelog
+---------------------
+
+2.x to 3.0
+----------
+- Module directory structure moved around.
+- Webform configuration moved to an entirely separate tab.
+- E-mail templates are now editable by administrators.
+- Conditional fields.
+- Submissions may be saved as a draft and resumed later.
+- Webform may now be attached to any content type.
+- Public API for allowing other modules to provide components.
+- Public API for interacting with submission save, insert, update, and delete.
+- New rendering capabilities for HTML presentation of submissions and e-mails.
+- Print module support.
+- Basic Views module support.
+- Popup calendar support on Date components (with Date Popup module).
+- New Mollom module integration.
+
+1.x to 2.0
+----------
+- Redirect POST option removed.
+- Webform components moved to the "Form components" tab when editing.
+- Webform node structure changed. All webform additions to the node are placed in $node->webform.
+- Clone option added to components.
+- Database storage improved to be more consistent and efficient.
+- Additional e-mails may be sent by modifying the $node->webform['additional_emails'] variable in the Additional Validation field.
+- The values of select and hidden fields may receive e-mails by using the option in Conditional e-mail recipients field.
+- E-mail from name, from address, and from subject may be entered in a text field.
+- The complete webform may be shown in the teaser view of a node.
+- Submit button text may be changed.
+- Theme function theme_webform_create_mailmessage() has been renamed to theme_webform_mail_message().
+- $cid parameter added to theme_webform_mail_message() to create unique e-mails depending on a particular recipient or component.
+- Theme function theme_webform_mail_headers added.
+- Component descriptions are textareas rather than textfields.
+- _webform_filtervalues() has been renamed to _webform_filter_values.
+

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,41 @@
+Description
+-----------
+This module adds a webform content type to your Drupal site.
+A webform can be a questionnaire, contact or request form. These can be used
+by visitor to make contact or to enable a more complex survey than polls
+provide. Submissions from a webform are saved in a database table and
+can optionally be mailed to e-mail addresses upon submission.
+
+Requirements
+------------
+Drupal 7.x
+
+Installation
+------------
+1. Copy the entire webform directory the Drupal sites/all/modules directory.
+
+2. Login as an administrator. Enable the module in the "Administer" -> "Modules"
+
+3. (Optional) Edit the settings under "Administer" -> "Configuration" ->
+ "Content authoring" -> "Webform settings"
+
+4. Create a webform node at node/add/webform.
+
+Upgrading from previous versions
+--------------------------------
+Note that if you are upgrading from a Drupal 6 installation of Webform, you MUST
+have been running Webform 3.x on your Drupal 6 site before upgrading to Drupal
+7 and Webform 3.x. You cannot upgrade directly from Webform 6.x-2.x to Webform
+7.x-3.x.
+
+1. Copy the entire webform directory the Drupal modules directory.
+
+2. Login as the FIRST user or change the $access_check in update.php to FALSE
+
+3. Run update.php (at http://www.example.com/update.php)
+
+Support
+-------
+Please use the issue queue for filing bugs with this module at
+http://drupal.org/project/issues/webform
+
@@ -0,0 +1,115 @@
+Overview
+--------
+Webform supports theming similar to the CCK or Views modules. Any webform
+may be themed on the server side, though doing so may require a reasonable
+amount of knowledge about the Drupal Form API. More information about the Form
+API may be found at http://api.drupal.org/api/file/developer/topics/forms_api.html
+
+Theme submission e-mails
+-----------------------
+The default e-mails sent by webform are fairly basic. If you like, you may
+customize the display of e-mails sent by each individual webform.
+
+- Open the Webform module directory.
+
+- Copy (do not move!) the "webform-mail.tpl.php" file to your theme directory.
+
+- Open up the new file and edit it to your liking. The webform-mail.tpl.php file
+ contains further instructions on how to get started with theming the e-mail.
+
+- If you want to edit the e-mail sent by only one particular webform, rename the
+ file "webform-mail-[node id here].tpl.php", replacing [node id here] with the
+ node ID of the webform.
+
+- Clear the theme cache! Visit admin/settings/performance and click the
+ "Clear cached data" button at the bottom of the page. You may also find
+ using devel module will speed up this process a bit. This needs to be done
+ every time you create or rename a .tpl.php file, but isn't necessary once
+ these files already exist.
+
+- To get a better idea of what variables are available to you, you can include
+ the print_r function in your email. Simply include the line:
+
+ <?php print_r($submission) ?>
+
+ to get a listing of all the available fields you can use in your mail.
+
+- Advanced Webform e-mail Theming: Theming the e-mail headers may also be done
+ by overriding the theme_webform_mail_headers() function from webform.module.
+ Just copy the code out of webform.module and change as necessary in your
+ template.php file. This allows you to customize the e-mail headers.
+
+Theme the confirmation page
+---------------------------
+
+After a user submits a webform, they are directed to a page that contains the
+confirmation message set in the webform node settings (assuming the form doesn't
+direct to a complete URL). These instructions let you customize the format of
+the confirmation page of a single node or all webforms on your site.
+
+- Open the Webform module directory.
+
+- Copy (do not move!) the "webform-confirmation.tpl.php" file to your theme
+ directory.
+
+- Open the new file and change it's contents to the your liking. Here's an
+ example that inserts some additional HTML around the confirmation message and
+ gives links to edit the submission.
+
+ <?php /* Begin sample webform confirmation page */ ?>
+
+ <div class="confirmation-message">
+ <?php print $confirmation_message ?>
+ </div>
+
+ <ul>
+ <li><a href="<?php print url('node/'. $node->nid . '/submission/'. $sid)?>">View your submission</a></li>
+ <li><a href="<?php print url('node/'. $node->nid . '/submission/'. $sid .'/edit')?>">Edit your submission</a></li>
+ </ul>
+
+ <?php /* End sample webform confirmation page */ ?>
+
+- You may edit the webform-confirmation.tpl.php file in your theme directory,
+ this will affect all the webform mails sent by your entire site. Or, if you
+ want to edit the e-mail sent by only one particular webform, rename the file
+ "webform-confirmation-[node id here].tpl.php", replacing [node id here] with
+ the node ID of the webform.
+
+- Visit admin/settings/performance and click the "Clear cached data" button.
+
+Theme display of an entire webform
+----------------------------------
+
+Theming a webform can be useful for rearranging elements or customizing the
+appearance of multiple components at once. This tutorial assumes usage
+of the phptemplate engine.
+
+- Copy the "webform-form.tpl.php" file from the webform directory to your
+ theme directory. You may rename this file
+ "webform-form-[node id here].tpl.php" if you want to theme one particular
+ webform on your site. Replace [node id here] with the node ID of the webform.
+
+- Open up your new file and customize the webform however you like.
+
+- Visit admin/settings/performance and click the "Clear cached data" button.
+
+- All Webform forms have 2 main fieldsets: "submitted", and "details". Although
+ you may move things around as you wish, keep all your components within the
+ "submitted" fieldset. Only the "submitted" fieldset is displayed and Webform
+ depends on the other two to operate properly, so don't mess with them unless
+ you have good reason to do so (like you're forwarding your webform to a custom
+ PHP or PERL script).
+
+Theme display of a webform submission display
+---------------------------------------------
+
+Theming the display of a webform submission works the same way as theming a
+webform form. Webform uses Drupal "renderable" style arrays for the display of
+submissions, just like most forms in Drupal.
+
+The template file for theming submissions is webform-submission.tpl.php. You can
+use webform-submission-[node id here].tpl.php for individual nodes if desired.
+Note that the contents of this template are used not only for display of
+submissions in the Webform interface but also in e-mails when printing out
+the %email_values token.
+
Oops, something went wrong.

0 comments on commit 2be4e0d

Please sign in to comment.