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

Web development tutorial

Automatically populate form fields on your checkout page

Tutorial created by Team WebAssist

Categories: eCart, PowerStore, Dreamweaver, MySQL, PHP

rating

If you are requiring customers to be logged in and registered on your website prior to completing a purchase, you have the opportunity to automatically populate some of the details on the checkout page.
Fields such as Name, Address etc. can be automatically completed based on information entered into your database.

This tutorial guides you through binding the form fields on your eCart checkout page with the user information that is stored in your database.

arrow downRequirements

If you have not yet set up the Login/Register functionality for your checkout page, review that tutorial now.

You should have the following items ready to go:

  1. Dreamweaver CS 3 or higher
  2. eCart checkout page with SecurityAssist login

arrow downCreating the recordset

The first step is to create the recordset for the data you intend to display.

We will not be providing instructions for storing credit card details. This is an insecure practice and is not advised for any website.
  1. In Dreamweaver, open the checkout page that was created by eCart.
  2. From the Server Behaviors panel, choose Add > Recordset.
  3. Enter a name for your Recordset.
    For this example, we will enter rsUser.
  4. From the Connection menu, choose your database connection.
  5. From the Table menu, choose the database table that contains your user's information.
    This needs to be the same database table that SecurityAssist used to create your register and login functionality.
  6. Leave the All option selected for Columns.
  7. From the Filter menu, choose the key column of your users table.
    For the table in our example, the key column is UserID.
  8. Leave = (equals) in the next menu.
  9. Choose Session Variable from the next menu.
  10. Enter UserID in the text field.

  11. Click OK.

arrow downBinding the form fields

The next step is to bind the initial value of each of your form fields to the information for the user who is logged in.

Step 1: Basic form elements

  1. Select the first form field to bind.
  2. From the Properties Inspector, choose the Init val lightning bolt.

  3. In the Dynamic Data window, expand the Recordset you just created.
  4. Select the database column that matches the form field you have selected.
    For example, if you selected the First Name field, choose the database column for first name.
  5. Click OK.

  6. Repeat this process for all other form fields.

Step 2: Menu Lists/Radio buttons

If you have menu lists or radio buttons that you want to set the initial value for, the steps are slightly different.

  1. Select the menu list/radio button.
  2. From the Properties Inspector, choose the Dynamic button.

  3. Choose the set value equal to lightning bolt.
  4. Select the appropriate recordset binding.
  5. Click OK.

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.