WebBlocks, Web Forms

 Creating Web Forms

Forms can be created manually or by using the Web Form Wizard.

You can use the wizard from the start when you create a WebBlock, but it can also be run any time afterwards by clicking on "Add a Form" in a WebBlock cell context menu. In the first case, the system creates the form and adds lines and columns to the main WebBlock table. In the second, the form is placed in a new table contained in the cell where it was added.

To manually create a form, choose "Add a Form" in a cell's context menu. To be functional, the form must contain at least one Form element: a Submit Button as well as one or more other Form elements.

 
 Form Types

There are three types of web form WebBlocks. The form function is defined by the submit button used.
  • Submit form by email

    With this type of form you can send data by email, as in a contact form for example.

  • Submit to the Shopping Cart

    Creates a sale process without going through the Shopping Cart component. This function is described in the Help topic WebBlocks, Shopping Cart Control.

  • Submit and run the execution script

    Upon submission, the form executes a script on the page (in VBScript code).

    Using execution scripts with a form, you can define calculations to perform with form values or modify the elements to be displayed. Your forms interact with your users.

    This functionality is described in the help topic WebBlock, Execution Script
 
 Range of Application

A WebBlock can be used as a full page on your site or as a static block that can "grafted" to certain elements of your site to replace a long text.

Forms will not work when they're applied within a component. You can't apply them, for example, in one of your category headers, in a product file, etc. Only the forms used in a WebBlock displayed as a page on your site will work properly.

 
 Form Elements

Here's a list of the various form elements available:


  • Text Zone.
Text zones and multi-line text zones allow users to send texts in the form.

These elements aren't compatible with "submit to shopping cart" type forms.

  • Check box, radio button and select list
These types of elements allow you to offer lists and choices to select from..

Check boxes allow multiple choices whereas radio buttons only allow one selection amongst several choices. Remember, for radio buttons to work properly, you must give the same name to each instance of the element.

These elements aren't compatible with "submit to shopping cart" type forms.

  • Date and Date / Time Controls
As their names indicate, these elements transmit dates.

Dates are systematically verified, even when not required. An invalid date, like february 31st, can't be submitted. That's why we recommend that you systematically define an error message for cases when an invalid date has been entered.

These elements aren't compatible with "submit to shopping cart" type forms.

  • File upload
Lets visitors send you attached files with their messages. Several files can be uploaded provided that their total size doesn't exceed 8 MB.

These elements aren't compatible with "submit to shopping cart" type forms.
  • Shopping Cart Control
Using these elements, you can set up a product to be added to the Shopping Cart. You can use several of these elements in the same form. This functionality is described in the online help topic: WebBlock, Shopping Cart Control

 
 Validating the Form

  • Required Entry: Note that the simple fact of making a field mandatory has the consequence of forcing the visitor to enter "valid" information. This means that you may find yourself with meaningless entries of "abc" or "xyz" that, in the end, are even more useless than a blank zone! Even for a zone that has multiple choices, the lack of an answer is sometimes better than a random answer.

  • Error Message: This message is displayed if the validation fails. It is recommended to use a concise message that is as specific as possible. Don't forget to indicate the name of the element in the form that is in error in order to facilitate the correction of the error for your users. For example: "The weight is mandatory and must be a positive whole number between 0 and 200." If you don't indicate "the weight", it will be difficult for the visitor to locate the zone that needs to be corrected. If you don't indicate the required conditions (between 0 and 200), the user has to guess when trying to define an acceptable value!
 
 Specific Validation Cases
  • Text Zones:

    Format types that can be verified

    • Free text : accepts any text entered
    • Email: requires the information entered to respect email address format, like for example: abc@xyz.com, with one and only one @ and a valid domain extension (.com, .co.uk, .org, etc.).
    • Whole number: requires entering a whole number within a range that you can set using the minimum and maximum fields.
    • Floating number : requires entering a floating point number within a range that you can set using the minimum and maximum fields.

  • Radio Buttons

    Don't forget that radio buttons, which require one answer out of several choices, work as a group and all the elements of the group need to be given the same name.

    Validation properties should only be defined for one element of the group, generally the first.

    If you set validation for several radio buttons in the same group, the results can be inconsistent and depend upon the type of web browser the visitor is using.

    Requiring a radio button selection insures you that one of the options presented will be chosen.

    The error message should only be defined on one element of the group (usually the first).

  • Drop-Down List

    "Consider the first value in the value list as invalid.": this option is used when the first element in the drop-down list is a lable like "choose an option" which instructs the visitor, but can't be a valid choice. By checking this box, you define the first option in the list as invalid.
 
 Saving data in HTML or XML format

You can retrieve the data from your forms (submitted by email) as an XML/HTML table or even directly in Excel and collect this data in a single click!

To activate data storage in HTML/XML formats, edit your WebBlock properties, open the "Form Properties" tab and check the "Save the values from the form in a file" box.

As visitors fill out your forms, you will receive email messages containing the data, but this data will also be stored in an organized manner and will be offered to you in HTML/XML formats. To access it, view the WebBlock properties.

The date and time that the form was filled out are automatically added.

Your backup file cannot exceed a size of 1 MB. Afterwards, the system can no longer store additional data. Even though this size limit is big enough to store hundreds and perhaps thousands of answers, you should reset your backup file from time to time.

To retrieve a file containing this data, go to your WebBlock's properties under the "Form Properties" tab and use one of the links proposed that look like this:

http://www.oxatis.com/PBCPDataViewer.asp?AccID=12345&AccKey=187474&FN=234361663&View=1

For those of you that know how to "read between the lines", this is not the name of a file but a method for accessing this file, provided that you know the keys (AccID, AccKey, FN) that are attached. When you save the file on your hard drive or when you use a request in Excel, the results are the same. You are dealing with a file, after all! The main advantage is that no one can try to scan your disk space (the space that contains your public images and documents) by using file names to try to steal your data.

Choosing between XML and HTML format?

One format is not "better" than the other. XML format is more comprehensive and more versatile, but sometimes it is easier to use an HTML format. Make this decision according to how you wish to use this data. In Excel 2000 for example, it is extremely easy to create a web request for an HTML file by simply providing a URL. A simple click will then update the data collected on the site without damaging the data contained in additional columns that you may have added.
 

Add to favorites: http://www.oxatis.com/Help/HelpCenterContent.asp?ActionID=512&TID=1167&MID=12000&LangID=1
© 2001-2014 Actinic. All rights reserved.