You are previewing Drupal 7 Webform Cookbook.
O'Reilly logo
Drupal 7 Webform Cookbook

Book Description

"

Over 100 recipes for exploiting one of Drupal's more popular contributed modules with this book and ebook.

  • Build feature-rich Webforms that inspire awe and amazement from the comfort of your web browser

  • Invoke your creative engine with stunning modules that extend an already comprehensive module– even create your own extensions

  • Explore every known nook and cranny of Webform in detailed byte-sized steps, including handling common pitfalls and caveats

In Detail

The Drupal Content Management System puts everyone in charge of their own internet destiny. Webform takes this power a step further by ensuring that you are never more than just a few mouse-clicks away from fully functional information-gathering forms. From simple contact forms to advanced web applications, Webform provides a solid tool set for both the novice and the expert.

Drupal 7 Webform Cookbook gives you everything you need to achieve in minutes what previously cost hours in development and testing. Practical demonstrations of every facet give both the technical and the not-so-technical users an in-depth understanding of how things work.

Install. Use. Customize. Extend. A mammoth learning curve devoured in small bytes: all digestible, with no choking.

From designing coherent forms, to sending pretty HTML emails and managing data, explore the rich scope of possibilities that Webform enables. Also, easily extend and tune Webform with custom components and functionality.

With Drupal 7 Webform Cookbook you are placed firmly in the driving seat.

"

Table of Contents

  1. Drupal 7 Webform Cookbook
    1. Table of Contents
    2. Drupal 7 Webform Cookbook
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Setting up Webform
      1. Introduction
      2. Downloading and installing Webform
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Configuring Webform for our website
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Webform-enabled content types
          2. Webform components
          3. Default e-mail values
          4. Advanced options
      4. Setting user roles and permissions
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    9. 2. Trying Out Webform
      1. Introduction
      2. Creating a Webform node
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Adding textfield components to our Webform
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Label
          2. Field key
          3. Default value
          4. Token values
          5. Description
          6. Validation
          7. Display
          8. Operations
      4. Cloning components
        1. How to do it...
        2. How it works...
        3. There's more...
      5. Adding e-mail components
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Viewing our progress
      6. Adding textarea components
        1. How to do it...
        2. How it works...
        3. There's more...
      7. Adding fieldset components
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Theming components via Cascading Style Sheets
      8. Adding select components
        1. How to do it...
        2. There's more...
          1. Phase one complete
      9. Configuring a reply e-mail
        1. Getting ready
        2. How to do it...
        3. There's more...
      10. Testing our Webform
        1. Getting ready
        2. How to do it...
    10. 3. Working with Submissions
      1. Introduction
      2. Viewing submissions metadata
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Sorting tables
      3. Viewing submissions
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Paging through submissions
          2. Resending e-mails
          3. Viewing multiple submissions
        4. See also
      4. Editing submissions
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Resending e-mails
          2. Updating data
        5. See also
      5. Analyzing submitted data
        1. How to do it...
        2. How it works...
      6. Downloading submissions
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Export format
          2. Select list options
          3. included export components
          4. Download range options
      7. Deleting submissions
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Clearing the database
        1. How to do it...
        2. How it works...
      9. Changing Webform results defaults
        1. Getting ready
        2. How to do it...
        3. How it works...
    11. 4. Discovering More Components
      1. Introduction
      2. Adding a page break component
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Adding a markup component
        1. How to do it...
          1. How it works...
          2. There's more...
            1. Text format
            2. PHP code
            3. Token values
            4. Conditional rules
      4. Adding a hidden component
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Browser detection
      5. Adding a grid component
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Display options
          2. Grid analysis
      6. Adding a date component
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Validating dates
          2. Providing a pop-up calendar
          3. Handling date input formats
      7. Adding a time component
        1. How to do it...
        2. How it works...
        3. There's more...
      8. Adding a file component
        1. How to do it...
        2. How it works...
        3. There's more...
          1. File types
          2. File gotcha
      9. Enhancing component descriptions with HTML
        1. How to do it...
        2. How it works...
    12. 5. Tweaking the Form Settings
      1. Introduction
      2. Confirming submissions
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Displaying the confirmation as a Drupal message instead
          2. Displaying a custom confirmation page
          3. Why no Webform token replacements?
      3. Limiting submissions
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Limiting the frequency of submissions
          2. Limiting the total number of submissions
          3. Anonymous users caveat
      4. Closing and reopening forms
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Closed, but still accessible
      5. Limiting access to forms
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Displaying Webform as block
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Display mode
          2. Show all Webform pages in block
          3. Block form error messages
      7. Saving draft submissions
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Automatically save as draft between pages
      8. Warning about previous submissions
        1. How to do it...
        2. How it works...
      9. Customizing submit button text
        1. How to do it...
        2. How it works...
    13. 6. Extending Webform
      1. Introduction
      2. Enabling the Select (or other) module
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Analyzing submissions
      3. Using the Options Element
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Custom option keys
      4. Defining custom option lists
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Options will not be editable if using pre-built list
      5. Enabling date pop-up
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Sending HTML e-mails
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Preventing spam with CAPTCHA
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Advanced data validation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Adding custom validation rules
          2. Client-side data validation
        5. See also
    14. 7. Theming Webform
      1. Introduction
      2. Preparing our custom theme
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Zen and subthemes
      3. Adding custom CSS
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Arrange Fields
      4. Adding JavaScript tricks
        1. How to do it...
        2. How it works...
        3. There's more...
          1. The jQuery library
          2. Animation missing when editing submissions?
          3. Same page conditionals
      5. Theming the confirmation page
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Webform theming tips
          2. What to override?
      6. Theming Webform e-mail headers
        1. How to do it...
        2. How it works...
    15. 8. Acting on Webform Submissions
      1. Introduction
      2. Modifying submitted data
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Deciding on direction
          2. Solve specific problems generally
          3. Drupal coding standards and best practices
      3. Adding custom validation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    16. 9. Creating Webform Components
      1. Introduction
      2. Creating the component module
        1. How to do it...
        2. How it works...
      3. Defining component features
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. 'csv' => TRUE
          2. 'email' => TRUE
          3. 'email_address' => FALSE
          4. 'email_name' => FALSE
          5. 'required' => TRUE
          6. 'conditional' => TRUE
          7. 'title_display' => TRUE
          8. 'title_inline' => TRUE
          9. 'private' => TRUE
          10. 'group' => FALSE
          11. 'spam_analysis' => FALSE
          12. 'attachment' => FALSE
          13. Using hook_webform_component_info_alter()
      4. Defining component defaults
        1. How to do it...
        2. How it works...
      5. Editing components
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Removing the description textarea
      6. Rendering components
        1. How to do it...
        2. How it works...
      7. Displaying and reporting component data
        1. How to do it...
        2. How it works...
      8. Analyzing component data
        1. How to do it...
        2. How it works...
      9. Validating submitted data
        1. How to do it...
        2. How it works...
      10. Testing the module
        1. How to do it...
        2. How it works...
        3. There's more...
          1. _webform_submit_component()
          2. _webform_delete_component()
          3. _webform_help_component()
    17. 10. Creating Submission Actions
      1. Introduction
      2. Creating a new select component
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Determining component identifier values
      3. Creating the module
        1. How to do it...
      4. Creating a conditional action
        1. How to do it...
        2. How it works...
        3. There's more...
          1. $actions['declined']['title']
          2. $actions['declined']['href']
          3. $actions['declined']['query']
          4. Adding more actions
      5. Adding a menu item
        1. How to do it...
        2. How it works...
      6. Confirming the requested action
        1. How to do it...
        2. How it works...
      7. Updating a submission
        1. How to do it...
        2. How it works...
      8. Sending an e-mail
        1. How to do it...
        2. How it works...
      9. Testing the module
        1. Getting ready
        2. How to do it...
        3. How it works...
    18. 11. Presenting and Managing Data
      1. Introduction
      2. Building custom reports
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Including submission metadata and links
          2. Tweaking options
          3. Setting role permissions
      3. Counting Webform submissions with views
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Obtaining help
      4. Tracking changes to submissions
        1. Getting ready
        2. How to do it...
        3. How it works...
    19. 12. Going Out of the Box
      1. Introduction
      2. Building a survey form
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Defining same-page conditional fields
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Coming soon to Webform
      4. Validating on the client side
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Support for Webform Validation module
      5. Importing submissions
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Separators and delimiters
          2. Using field form keys instead of field names
          3. Mandatory fields and data formats
          4. Updating existing submissions
    20. Index