This documentation is also available on the MyLO Documentation portal: https://my.lwv.org/mylo/add-form

Structure of a Webform

Webforms are made up of several development layers, each of which allows you to define and shape the webform in different ways. 

  1. The first layer of the webform is the page that contains the webform. This will appear in the content menu and can be edited with a New Draft, like a Basic Page. Any content added to this container will precede the Webform and can provide context or instructions. 
  2. The second layer is the Webform itself. Form elements such as text fields, selection menus, radio buttons, checkboxes, etc., are added and configured here. 
    1. Please note that because the Webform is a separate layer, the Publishing Options visible in the first layer do not affect it. There is no draft mode for the Webform layer, and any changes made there go live immediately. 
  3. Advanced layers to webforms allow for further customization and functionality, and include conditionals, validation, and various settings. We will cover each of these separately within this guide.


1. Create the Form Page

First, create the page that the webform will "live" in. 

  1. Open your Administer League Site menu
  2. and then select Add Form. You will see a page with the WYSIWYG text editor, just like you see when creating a basic page. 
    1. Content you add here will precede the form. This can be left blank, or can be used to offer context/instructions relevant to the form.
  3. Once you are happy with your changes to this section of the form, click Save, and then a new tab called Components will appear on the screen.


2. Add Components

Components are the elements your form will be built out of; most of them collect user input. They will be created and configured one at a time.

  1. First, add a Label,
  2. then select a Type,
  3. and then click Add. This will take you to a new page where you can configure the additional settings for the component you're adding. 
    1. For more details on the different component types and how to configure them, click on this Form Components link.


3. Configure Form Settings

Form settings are accessed by clicking on Webform, then Form Settings. Full details on form settings and what they do can be found in the Form Settings section.


4. Configure Email Settings

Webforms can optionally be configured to send emails upon form submissions. This is configured by clicking on the Email tab, entering an address, and clicking Add. Full details are available in the Email Settings section.


5. Viewing and Downloading Submission Results

  1. Click the Results tab.
  2. Click the Download link for a spreadsheet (in Excel or .csv format) of the submission results.


6. Form Conditionals (For Complex Forms)

Conditionals can be used to create advanced forms that reveal or omit certain questions based on user input. For example, you could ask users at the beginning of the form to indicate if they are staff or faculty, and use a conditional to show different follow-up questions depending on their response.


The following is a simple set of instructions you can follow to set up and use conditionals:

  1. Click on the Webform tab, then the Conditionals sub-tab
  2. Click the icon next to the text "Add a new condition"
  3. Use drop-down menus to set up each conditional logic, as described below.
    • The basic formatting is as follows:
      If [component][condition][value],
      then [component] [condition] [state]
       
    • As an example, consider a form used to reserve a room. Perhaps different follow-up questions are required based on the day of the week the user chooses from a select options component. A conditional might read:
      If [Day of the week] [is] [Monday],
      then [Weekend reservation] [isn't] [shown]
  4. You can add or remove conditionals, or "if" and "then" statements to an existing conditional, with the + and - icons.
  5. Click Save conditions to apply your conditionals to the form.

 


CAPTCHA

CAPTCHA is a challenge-response test used to help determine whether the user is human and can mitigate the amount of spam your form receives from spambots. CAPTCHA is automatically enabled on all MyLO forms to prompt all anonymous (unauthenticated) users with the test.





Source: https://drupal.calpoly.edu/webforms-guide. Edited by MyLO Team.