Test Your Webform

Whenever you are creating a form, try it out on people as you develop it.

You can always switch back and forth between these two tasks, but the basic creation task has to come first:

1. Create a new webform using the Create Content command in the menu. This opens the page shown in Figure 13.15. As with all nodes, you must provide a title (Remember that the webform itself is a node; the submissions from end users are linked to the node.) Although you do not have to provide the description and the confirmation message now, it is a good idea to do so before you forget.

jfeiler

My account Administer

Lei us know whoI you think [ green.northcountryconsultingitom

Lei us know what you think

Form components

Menu settings Webrorm Settings

Description:

We're always trying to improve oi

Confirmation message or redirect URL:

Thanks for your feedback!

Message to be shown upon si

2. Further down the page, you specify the access control for the webform, as shown in Figure 13.16. In many cases, you do not want to allow anonymous users to submit the webform. The exception might be in a "send me information" form, where you want to cast the widest possible net for prospective customers or clients.

3. Configure the webform email settings further down the page, as shown in Figure 13.17. You can use the default values, or you can type in custom values. After you create components, you can use them for email settings. For example, you can create a field into which end users can type the subject of their query and then use that field's contents as the email subject.

FIGURE 13.17

Configure email settings.

The advanced settings, shown in Figure 13.18, let you enter PHP code for additional validation (but as always, be careful with adding PHP code). The most common settings you need to consider are the number of submissions and whether to rename the Submit button. Webform uses username and the IP address to check for duplicate submissions. (In the global configuration settings, you can also let it use cookies, but that option does not add a great deal of refinement to the existing username/IP address checking, so you are usually better off to leave the defalt settings.)

FIGURE 13.18

Configure advanced settings.

GOTO HOUR 19, USING BLOCKS, for more on blocks.

« ~ o

Create Webform I localhost

Webform mall settings

E-mail to address:

Conditional e-mail recipients

0 Default: localhost O Custom:

0 Component: No available components ;

© Default: [email protected] 0 Custom:

O Component: No available components ;

& Default: Form submission from: %title 0 Custom:

O Component: No available components :

« n o

Let us know what you think I green.northcountryconsulting.com

□ Show complete form in teaser

Display the entire form In the teaser display of this node.

Limit the number of submissions a user may send within a specified time period

O Limit to submission(s) ' ever H

Submit button text:

Submit Comments

Additional Validation:

Enter PHP code to perform additional validation For this form. Indude the ?> tags. Sform and $form_state are available

validate function used In the Forms API.

Turn off post display.

5. Most of the time, you should disable comments for the webform. You want comments and other input to come in through the webform itself. (But, do make sure to have a free-format field where people can add their thoughts.)

6. When you are finished, click Save to create the webform and begin working with components. For now, you may want to leave the webform unpublished. Eventually, you will probably want it to be published, and you may want it to be promoted to the front page—possibly stuck to the top where it will be noticed. If it will be used in a block, such as Contact Us, you will probably not promote it to the front page.

7. If this is your first webform, you may want to turn off display of the post information for webforms ("submitted by username on date"). Do this on Administer, Site Building, Themes, Configure, Global Settings, as shown in Figure 13.19. Just uncheck the Webform box under Display Post Information On at the right. You cannot do this for an individual webform; you must do it for all webforms, but that is usually the correct choice.

« ^ n

Themes I green.northcountryconsulting

com

jfeiler

Themes List gfflTfflTW

My account

Administer

These options control the default display settings for your entire

site, across all themes. Unl

ss they have be

en overridden

Content management

by a specific theme, these settings will be used.

Site building Blocks

Menus Modules

□ Logo

when displaying posts of the

following type.

Site conñguratlon User management Reports Help

isf Site name □ Site slogan

Mission statement

M Story □ Webform

Log out

G User pictures in comments

M Shortcut icon M Primary links Secondary links

The second task in creating a new webform is adding components to the basic webform. These data entry fields make up the form.

Try It Yourself

Article Marketing Gold

Article Marketing Gold

Discover How You Can Use The Huge Power of Article Marketing To Drive Highly Targeted Traffic To Your Website and Instantly Become THE Person Your Prospects Want To Buy From.

Get My Free Ebook


Post a comment