Webform module

Created by webmaster

drupal webform module
http://drupal.org/project/webform 6.x-2.7 on 6.14

Main function:
Webform is used to create form pages that the user can submit by email while it also enters the database.

Example functions:
You can create a questionnaire with data entered to the database and emailed to admin. It can also be used to create a custom contact page with all sorts of visible and hidden fields, that similarly enter to a database and are emailed to admin.

Replacing the core contact page:

The core contact page is nice and simple, but it has several disadvantages:
a) you can't add fields easily
b) you can't make it send you user IP data easily
c) it's not checked by the Spam module
d) custom information text is not translated easily

Well, it's me who cannot do these things easily, maybe someone else can. Anyway, if the contact module would do these from drupal core, I would much prefer to stick with the standard contact page.

As it is, with a webform you can solve all these disadvantages. But first:

Errors:
Upon installaton a very long list of error messages all referring to "duplicate entry" (see below). I will ignore them, hopefully they will go away. Yes, they do.

Manage:
Webform admin is at Site configuration > Webform. That has two sections:
Configure: for creating and managing a form's basic behavior
Form components: for creating and managing the behavior of each form field (box) of a specific form

Example - Creating a contact form:
In Configure ceate a basic web form first using the defaults. Save these basic settings, they are not yet final, you'll be coming back to this. Then, in Form components add the fields as needed. Pay attention to the field types, for example if the field should contain a visitor's email address, then choose type "email". Normal entries are "text fields", the contact message is a "text area". You can add tokens like %email to pre-populate a field by default, which the visitor to the form can change when filling it. Once you get into it, it's not so difficult.

Then go back to the Configuration tab and change the defaults for "Sender from name" to: component Name (or whatever you called the contact name), and "Sender fom email" to: component E-mail address (or whatever you called the email address), and "E-mail subject" to component Subject (or whatever you called the subject). Have a look at the others, too, to see if changes are desired.

Test sending the form, as a logged in and an anonymous user. Adjust as needed. Initially the form may send out double mails. But that miraculously stops.

When done, the form is created as a standard node.

Others:
Do not mark "conditional settings" email if there is no email address there -> error messages when sending mail (but mail gets sent).

Consider to disable the text that says "Submitted by Username on [date]". Do this in your Site building > Themes > Configure > Global settings, at a checkbox.

If you have the spam module installed, enable it for webforms in Site > Spam.

The IP data is already collected and emailed by default with the user name (great). With tokens supplied in the ui I could make a hidden line manually that did this too.

It looks like it is not possible to make a copy to yourself checkbox for authenticated users, as in the original contact form.

I could not figure out how to make a custom subject line containing both a) the site name and b) the enquirer's own subject text. Each one separately is no problem, so it must be possible somehow. But I think this cannot be done out of the box. There are detailed instructions that I do not yet sufficiently understand at http://drupal.org/handbook/modules/webform and http://drupal.org/node/464032. WIP.

Disabled/uninstalled the core contact module. Uninstalling the core contact module gave a red error (details see below). As I had the database open at the time, I could see that the table was there before unistallation and gone after. So I guess it found out that the table was gone and gave this warning?

Multilingual conversion:
In Content mangagement > Content types > Webform set the workflow settings for Multilingual support to Enabled with translation support. This adds the Translation tab for each form.

While you are there, also uncheck the Promoted to front page - as probably front page promotion would not be default for any further forms. Some of the other settings may also be of interest.

Go back to the form, (it took more than one reload for the Language capability to appear [seeing something not work becomes a shocker every time], but now its there. Click the translate tab and do redo the entire form from scratch, once per language. ---------

Webform installation - duplicate error warning details (multiple):
user warning: Duplicate entry 'themes/pushbutton/pushbutton.info' for key 1 query: INSERT INTO dbaseprefix_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('pushbutton', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:10:\"Pushbutton\";s:11:\"description\";s:52:\"Tabled, multi-column theme in blue and orange tones.\";s:7:\"version\";s:4:\"6.14\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1253130027\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";s:7:\"content\";s:7:\"Content\";s:6:\"header\";s:6:\"Header\";s:6:\"footer\";s:6:\"Footer\";}s:8:\"features\";a:10:{i:0;s:20:\"comment_user_picture\";i:1;s:7:\"favicon\";i:2;s:7:\"mission\";i:3;s:4:\"logo\";i:4;s:4:\"name\";i:5;s:17:\"node_user_picture\";i:6;s:6:\"search\";i:7;s:6:\"slogan\";i:8;s:13:\"primary_links\";i:9;s:15:\"secondary_links\";}s:11:\"stylesheets\";a:1:{s:3:\"all\";a:1:{s:9:\"style.css\";s:27:\"themes/pushbutton/style.css\";}}s:7:\"scripts\";a:1:{s:9:\"script.js\";s:27:\"themes/pushbutton/script.js\";}s:10:\"screenshot\";s:32:\"themes/pushbutton/screenshot.png\";s:3:\"php\";s:5:\"4.3.5\";}', 'theme', 'themes/pushbutton/pushbutton.info', 0, 0, 0) in /home/sitename/public_html/modules/system/system.module on line 822. ---------

Contact form uninstallation - doesn't exist error:
* user warning: Table 'username.dbaseprefix_contact' doesn't exist query: ALTER TABLE saa_contact DROP KEY category in /home/username/public_html/includes/database.mysql-common.inc on line 417. * user warning: Table 'username.dbaseprefix_contact' doesn't exist query: ALTER TABLE saa_contact ADD UNIQUE KEY category (category) in /home/username/public_html/includes/database.mysql-common.inc on line 403. * user warning: Table 'username.dbaseprefix_contact' doesn't exist query: ALTER TABLE saa_contact DROP language in /home/username/public_html/includes/database.mysql-common.inc on line 322. ---------

After security update from 6.x-2.7 - 6.x-2.8, in Reports > Status report > List the red security warning does not go away (091015). ---------

PM: 
JT = webform contact form
SP = webform contact form
BC = i18n core contact form