Creating a Drupal Webform
The next section, Components, is where you will create the fields to appear on the form. Click on the ‘Add a new component’ pulldown menu to choose what kind of field you would like.
- Captcha – A captcha is the image of skewed letters and numbers or a simple math question that appears on a form to differentiate between computers and humans. This serves to reduce spam. Please note that this function will only work if the captcha module is installed.
- Date/email/time – You can create components that will ask users to fill in a date, time or email address. Choose the component you would like to include and click Add, and you will be able to set the options for the component.
- Fieldset – This allows you to group certain questions together. For example, you can create a fieldset for Contact Information. Enter a name and description for the fieldset, and choose whether you want the fieldset to be collapsible or not. Select the weight and click Done. Then when you create the ‘textfields’ for Name, Phone number etc., you can select the ‘Parent Fieldset’ “Contact Information”, and those textfields will all appear in that fieldset.
- File - You can allow people to upload files to be sent to you through this field. Give the file component a ‘Field Key’ (a name that’s is all in alphanumeric characters and underscores), a ‘Label’ (the label that visitors will see), and a ‘Description’ such as ‘Documents’ or ‘Upload any documents pertaining to your application’. Select the types of files you will allow people to send, specify the maximum file size, and check the mandatory box if everyone must include a file.
- Hidden/Markup – The ‘Hidden’ component is for advanced admin. It creates hidden forms that site visitors will not see. The ‘Markup’ component allows for custom html or PHP. These two options will not be needed.
- Select – This option is used when you want people to choose from a list of options in response to a question. For the ‘Field Key’, enter a title in alphanumeric characters and underscores. In the ‘Label’ field, enter the question you would like answered (eg. Which countries have you visited in the past year?) In the ‘Options’ field, list the possible choices, ensuring that there is one choice per line. Please note that the Rich Text Editor must be disabled. The ‘Description’ field can be filled in to give users extra information on the question. (eg. Only check off countries in which you stayed for over 3 nights). Check off ‘Multiple’ if users will be able to check off more than one choice. If you check off ‘Listbox’, the choices will appear in a pulldown menu.
- Text area/text field – These two will be used when you would like users to respond to a question for which they will have to type out the answer. (eg. Name). ‘Text Area’ is used when you would like to give users a larger space to type in, and text field is used when only one line is needed. For ‘Text fields’, specify the ‘Field Key’ (eg. phone_number), ‘Label’ (eg. Phone number, address), give a ‘Description’ to help users, specify ‘width’ (50-60 is usually large enough), and check off whether or not the field is mandatory. Text area is filled out the same way, except you will need to specify a height in addition to the width. (5 will give you a box that’s 6 lines long)
Once you’ve added all of the components, under the ‘Mail Settings’, please enter the email address that you’d like the submitted forms to be sent to.