close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Web development tutorial

Getting Started with CSS Form Builder

Tutorial created by Team WebAssist

Categories: Data Bridge, CSS, Dreamweaver, PHP

rating

CSS Form Builder 2 incorporates a number of older WebAssist extensions to create a complete form building experience. Using CSS Form Builder, you can create complete online forms for sending emails, uploading files, and much more.

This tutorial will guide you through creating a form with CSS Form Builder. This form will include functionality for sending emails, uploading files, validation, and more.

arrow downRequirements

You will need the following items before starting this tutorial:

  1. Dreamweaver CS3 or later
  2. CSS Form Builder 2 Installed (click here for installation instructions)
  3. PHP/MySQL Testing Server (optional)
    For more information see Setting up a Testing Server
  4. Dynamic Site Defined in Dreamweaver
    For more information see Defining a dynamic site in Dreamweaver
  5. MySQL Database Connection configured (optional)
    For more information see Creating a MySQL database connection in Dreamweaver

arrow downLaunch CSS Form Builder

The WebAssist menu


When installing CSS Form Builder 2, a number of entries will be added to a WebAssist option of the Dreamweaver menu. This menu contains all the access points you will need to create your forms, and make custom changes to existing forms. The following section details what can be accomplished from each access point.

  1. Forms: Contains access to CSS Form Builder and other tools related to form creation.
  2. File Manipulation: Provides access to tools for creating file upload or download functionality, and for managing files on your server.
  3. Forms > Progress Bar: Allows you to insert a progress bar to any form.
  4. Create Email Message: Allows you to apply email functionality to a page.
  5. Forms > Validations: Allows you to manually apply client side and server side validations to existing forms.
  6. Forms > HTML Editor: Allows you to insert HTML Editor instances to existing forms.
Most of these tools are utilized for you by the CSS Form Builder interface but can be individually accessed in case you want to apply that functionality to other forms that were not created by CSS Form Builder.

arrow downChoose your form type

The first step in creating your form is to choose the type of form you intend to create. CSS Form Builder includes a number of presets for you to choose from. It is recommended that you select a preset that closely matches what you are trying to create. You can then modify the preset by adding additional fields, or removing ones you do not require.

Step 1: Choose a form

  1. From the Choose a form menu list, choose a form category that best matches what you are going to create.

  2. From the next menu list, choose the specific form type that you wish to create.
    If you wish to create a new form from scratch, leave <New From Blank> in the first menu list, and proceed with modifying your form.

Step 2: Customizing your form contents

If you wish to add/remove fields that currently exist in the form preset you have selected, you will want to follow these steps for guidance on customizing the contents of your form. This includes adding file fields to your forms for adding file upload behaviors.

  1. The Edit Form interface of CSS Form Builder allows you to modify each individual form element, configure validation, and rearrange the layout of your form.
    In this interface, the various form elements are organized by groups, where each group contains one or more form elements. Each group is managed within a Fieldset.

    1. Change the label of a fieldset by selecting the fieldset and modifying the options below.
    2. Select each group individually to modify the options for each group.


  2. Choose from the category menu to choose the category you wish to use for the selected group.
    Selecting a category is the quickest way to customize which form fields appear on your form without having to manually configure the validation. To save time you might want to create groups that contain the fields you want, and just delete any fields that are not needed.


  3. Add any additional groups by clicking Add > Element group

    The new group will be added directly beneath the currently selected group.
  4. Add a new fieldset by selecting an existing fieldset and clicking Add > Fieldset.

Step 3: Modify individual form elements and validation

If desired, you can modify each individual form element by following these steps. This is where you have the ability customize the validation error messages, and what type of validation is applied to each element.

  1. Select the group that contains the elements you wish to modify and choose Edit.
    On this page, each group is broken down into lines which are further broken down into sets. A line is an actual line on the page, and a set often consists of multiple form elements that share the same label.
    For example, ‘Name’ is commonly in the same set, but contains two text fields (first name and last name).
    A set shares the same validation error message. Therefore, if one of the form fields in a set fails, the same error message will display.

  2. To customize the validation error message, select a set from the tree, and enter your desired message in the window.

Step 4: Changing the form element type

  1. Select a field from the tree.
  2. From the options available below, complete the following.

    1. Label: Enter the label (if any)
    2. Type: Choose the type of form element you wish to be created.


    To protect your form from being completed by web robots, Captcha and Security Question options are provided under the Type menu. These two options do not have validation options.

Step 5: Applying validation

  1. For the selected form element, configure the following.

    1. Required: Select if this form field must be completed to pass validation.
    2. Validation-Type: Choose the type of validation you wish to be applied to this field.


    CSS Form Builder automatically creates the necessary validation for the type of validation selected.

  2. Once you have specified all the settings for that form element, repeat the process with all other form elements within the tree.
  3. Choose Finish when you have made all your changes.
After choosing Finish, you will be prompted to save a preset. This will allow you to quickly use these same settings to create additional forms in the future.

arrow downCustomize form design

CSS Form Builder provides a number of preset designs that you can choose from. These designs vary in size and shape and are provided to save you time in finding the best form for your site. Although each individual element of your form can be modified however you like, to save you time in creating the perfect form design, CSS Form Builder 2 has integrated Theme-It. Using Theme-It, you can customize all the colors used in your form as well as any images that may be included.

  1. In the Form Details tab of the main CSS Form Builder UI, select a design from the Choose a design menu.
    Reference the preview area to the right to see the form you are creating.

    Choose the form design that you like best and you can customize it further to match your site's design. If you want to design your form from scratch, leave <New From Blank> selected.

  2. To modify the colors and images of your site, select the Theme-It button.
    Theme-It provides two tabs for customizing your form design: Colors and Images. Refer to the Theme-It Getting Started Guide for more information.
  3. To modify the CSS for individual elements of your form, choose the Customize CSS option.
  4. Choose from the menu list the aspect of your form you wish to customize the design for.
    For some options, an additional menu list will appear.
  5. Each option includes different settings allowing you to completely modify each aspect of a form.
    To save time, you may only want to modify the design for the elements that appear on your page. For example, if you are not using Captcha, you may not want to devote the time to customizing its appearance.

  6. Proceed through each option, modifying the settings to appear as desired.
  7. Click Apply to update the preview as you make changes.
    To test changes to validation messages and date picker designs, you will want to preview your form in a browser by clicking on the Preview.
  8. When you are finished, click Finish.
  9. If desired, save a preset so that you can use your same design for other forms you create with CSS Form Builder.

arrow downSpecify the Action Page

The Action Page is the page that this form will submit to. For most forms, the action page is the same as the page you are inserting the form to, and this is set for you by default.

  1. Choose the browse option for the Action page field, or manually enter the action page you wish to use.

arrow downSelect form method

Forms can be submitted through one of two different methods. By default, POST has been selected as it is the most secure and will work for most types of form. The following describes which method to use:

  1. POST - Should be used for most forms. This option is most secure since it does not display any values in the URL field after submitting.
  2. GET - This method will includes the various values entered into the URL field when submitted. This is useful in situations where you might want to allow for bookmarking the resulting page.

arrow downForm Function

The Form Function tab is provided for you so that you can configure any form functions that are going to be applied to your form based on the form elements that you have added to your page. The Form Function tab allows you to configure email settings (if you wish the form to send an email when submitted), file upload settings (if your form contains a file field), and HTML Editor settings (if your form contains an HTML Editor instance).

  1. From the main Form Builder interface, choose the Form Function tab.

Step 1: Configuring Email Settings

  1. If you wish an email to be sent when submitting this form, select the Send the form contents in an email checkbox.

  2. In the From field, enter the email address you wish the email to appear to come from, or choose the lightning bolt to specify the value dynamically.
  3. In the To field, enter the address that the email should be sent to. In most cases, you will want this to be the email address that was entered in the Email Address field of your form. Follow these steps to specify the To address dynamically to a field in your form.

    1. Choose the To field lightning bolt.
    2. In the Select Data Bindings window, expand the Current Working Form option to choose an option from your form.
    3. From the list of available form elements, choose the field that contains the email address you would like to use.

    4. Once selected, click OK.


  4. In the Subject field, enter a subject that you want to use for the email that is sent.
  5. From the Template menu, choose a template for the email the email.
    Refer to the preview to see the different email template options.
  6. For more specific Email Settings configuration, choose the Edit option to launch the Universal Email interface.
    This will allow you to configure attachments, set delay options and any of the other features of Universal Email with the form you are creating.

Step 2: Configure File Upload Settings

If your form contains a file field, the Form Upload Settings option will be available on the Form Function tab.

  1. Select the Save uploaded files checkbox if you wish to save files that are uploaded through a file field on your form.
  2. Using the browse option or lightning bolt, specify the folder to be used to store the uploaded files.

Step 3: Configuring the HTML Editor settings

If you wish to utilize the HTML Editor Advanced File Manager features, including apply an existing SecurityAssist rule to the file manager, you will need to configure your HTML Editor Settings here.

If your form contains an HTML Editor instance, the HTML Editor Settings will be displayed on the Form Function tab.

  1. Select the HTML Editor Global Upload Settings Edit option to launch the HTML Editor interface for managing your HTML Editor instance.
    For assistance in using this interface, refer to the Form Function page of the CSS Form Builder help system.

arrow downFinishing Up...

Once you have configured all the settings for your form, you can go ahead and click Finish to create the form in Dreamweaver.

When your form is created, CSS Form Builder will create a webassist folder and a SpryAssets folder that contain the files used for your form to function. Make sure to upload these files to your live server when publishing your form.

Testing your form

If you have a PHP Testing Server configured, you can test your forms functionality immediately.

To test the email functionality of your form, you will need to make sure that your testing server is running an email server. In some cases, you may need to customize the Email Settings which you can do by reentering the Universal Email interface by selecting the Universal Email Behavior from the Server Behaviors panel. See the Email Object Settings of the CSS Form Builder 2 help documentation.

arrow downReentering the interfaces

All the various features or functions added to your form can easily be further customized or changed by reentering each particular interface. In some cases, further modifications that aren't provided in the CSS Form Builder interface, can be accessed from the particular interface that handles that functionality. The following information shows you how to reenter each interface for modifying various behaviors.

  1. With your form open in Dreamweaver, click once on the tabbed outline of your Form Builder form.

  2. From the Properties Inspector, choose from the following depending on what you wish to modify.

    1. Choose Edit Form to launch this form in the CSS Form Builder primary UI.
    2. Choose Edit Theme to open the Edit Design Interface.
    3. Choose Edit Contents to edit the form contents.
    4. Choose Edit or Remove for the Progress Bar.



    The Properties Inspector also includes two additional options for further modification of how your form functions.

    1. From the Target menu, specify a desired target for the form.
    2. From the Encoding type menu, specify a desired type.




Additional Reentry points


Other features that have more complex functions can also be modified after your form has been created.

  1. Updating Email functionality: Open the Dreamweaver Bindings panel from Window > Bindings, and double-click the Universal Email Binding. This will launch Universal Email where you can fully customize the email functionality applied to your form.
  2. Updating HTML Editor functionality: From Dreamweaver's Design View, select the HTML Editor instance. Choose the Edit option from the Properties Inspector to launch the HTML Editor interface.
  3. Updating file upload functionality: Open the Dreamweaver Server Behaviors panel from Window > Server Behaviors, and double-click the File Upload behavior.

arrow downAdding Database Insert

At this point, you should have a functioning form that you can upload to your website. However, if you wish for your form to insert data into a database, you will need to apply Insert Record Server Behaviors using a different WebAssist extension, DataAssist.

For more information on applying the Insert Record behavior using DataAssist, review the Insert Record page of the DataAssist Help System.

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.