Working With a Webform

Webforms are used to create input forms that allow visitors to submit information.  Only managers can create webforms.  They consist of four main parts:

  • Form components鈥攖hese are the basic form elements that create the form itself (text fields, radio buttons, etc.).

  • Conditionals鈥攗sed to hide or show form components based on the value of other form components.

  • Emails鈥攄etermine who gets form submissions and what the content of those emails look like.

  • Form settings鈥攁dd a submission confirmation message and other settings.

Things to remember

  • Although there is an encrypted field to collect WIN numbers, it is important to remember that all other fields in webforms are not secure. You should never ask for information such as a person's Social Security number, credit card numbers or even birth dates.

    For example, collecting birth dates is problematic on two fronts: first it collects personal identification information that could lead to identity theft and security breach issues. Secondly, if this was for something like a music audition, you don't want to have any claims from rejected applicants asserting that the decision to admit was actually influenced by age, which could lead to a discrimination claim.
  • The simpler and shorter the form, the better. Simple forms include fields for name, email address, phone, subject and message; and phone is usually optional. Only request information that will actually be used, and only require information that is essential.

  • The output from the form may be sent as an email message to one or more addresses鈥攖here is no Cc: or Bcc:. Ideal for this purpose is an office email address to which multiple staff members have access, and which is checked at least once each business day. Alternately, the messages may go to two or three individual staff email addresses, with one person assigned primary responsibility, and the others available to cover.

How to create a 鈥淐ontact Us鈥 webform

Webforms start out very similar to the Basic page content type. This form will include components for name, email, category, subject and message. "Contact Us" is the bottom link in the section menu and is required on nearly all sections.

  1. Click on Add content in the administration menu and select Webform.

  2. Enter a Title鈥攖he title for a "Contact Us" form should be Contact Us.

  3. Choose the Section to which this webform belongs, if you have more than one.

  4. Add a Custom URL鈥斺淐ontact Us鈥 webforms should have contact entered into this field.

  5. Add text to the Text above the form field if you have particular instructions for your form.

  6. Add text to the Text below the form field. Additional contact information should be listed here. It should minimally include a mailing address and main office phone number, formatted exactly as shown in the example below. Other information can include physical location and campus mail stop, secondary phone numbers for major divisions within the office or department, and general office hours. Although a physical location is optional, it should be included to assist visitors in finding you, since most of the University鈥檚 mailing addresses are not useful for this purpose.


    Office of Marketing and Strategic Communications
    Western 麻豆传媒应用 University
    1903 W 麻豆传媒应用 Ave
    Kalamazoo MI 49008-5433 USA
    Phone (269) 387-8400

    Location
    300E Walwood Hall, Mail Stop 5433


  7. Attach media to the Attachments field if necessary.

  8. Press the Save button at the bottom of the page.

Now that you have created the basic page part, we can now add the form elements themselves.

Adding webform fields

  1. Click on the Webform button.

  2. Under the Label table header, click in the field where it says 鈥淣ew component name鈥 and enter Your name in the field.

  3. Leave the Type as Textfield.

  4. Check the required box to make this field mandatory.

  5. Click Add. On the next page you will be given a series of options to change many variables that you can experiment with, but for most components you will not need to modify any of these settings.

  6. Scroll to the bottom of this page and click Save component. This will return you to the Form components view where you will see your component has been added. 

  7. Add a field to collect an email address in the form by repeating step 2, except enter Your email in the field.

  8. Change the Type to Email.

  9. Check the required box to make this field mandatory.

  10. Click Add. Again, leave everything on the next page alone.

  11. Scroll to the bottom of this page and click Save component.

  12. Add a Required component with a Label of  Category  and a Type of Select options and click Save. Now, there are a few things to note:

    • The Select options Type creates radio buttons, checkboxes and select lists鈥攖he default is radio buttons.

    • Check the Multiple checkbox to turn the options from radio buttons to checkboxes.

    • Check the Listbox checkbox to turn the options into a drop-down list.

    • Never have both Multiple and Listbox checked, the result is unacceptable for mobile devices.

  13. In the Options field enter the following:

    faculty|Faculty
    staff|Staff
    student|Student
    other|Other

    Note that this uses the pipe "|" character which is created by pressing Shift + \.

  14. Check the Listbox checkbox, scroll down and click Save component.

  15. Add a component with Label Other and Type Textfield to the form.  A conditional will be used to expose this field when someone selects Other from the Category select list.

  16. Next, add a Required component with Label  Subject and Type Textfield to our form. Leave everything on the next page the same; scroll to the bottom of the page and click the Save component button.

  17. Finally, add a Required component with Label  Message and Type Textarea to our form. Leave everything on the next page the same; scroll to the bottom of the page and click the Save component button.

Setting our conditional element

  1. Click on Conditionals

  2. Click the plus sign (+) to begin creating the conditional.

  3. Determine what should happen when a specific condition is met:

    If Category is other
    then Other is shown

  4. Click Save conditions.

Adding emails

  1. Click on Emails.

    In the Address field enter the email recipient and click Add.  This will take you to the Edit email settings page.

  2. For the Email subject, select the Component radio button and select Subject from the dropdown list.  This will use the submitted Subject value as the subject for the email being sent.

  3. For the Email from address, select the Component radio button and select Your email from the dropdown list.

  4. For the Email from name, select the Component radio button and select Your name from the dropdown list.

  5. For the Email template section, replace the default text with the following:

    Submitted values are:
    [submission:values]

    This message was generated from the [current-page:title] at [current-page:url].

    Be sure to experiment with this as you see fit.

  6. Click Save email setting.

Modifying form settings

For basic webforms it is recommended that you do not change anything on this page, however there are several things to note:

  • Confirmation message鈥攖his is the message that is shown to users upon a successful submission.

  • Redirection location鈥攖his is where the user goes after a successful submission.

  • Total submission limit鈥攖his limits the total allowed submissions.

  • Per user submission鈥攍imits the number of submissions per user.

  • Status of this form鈥攃loses the form and prevents any further submissions.

  • Progress bar鈥攄isplays a progress bar for multi-page forms.

  • Advanced settings鈥攃ontains a few more options, including the ability to rename the "Submit" button text.