Thursday, April 1, 2010

Autofill form text fields from database

I have made a form in asp code with text fields. Behind this page is a database (access).

This database contains static information and does not need to be updated. It is only for output.

In this form, there are some text fields to be filled in.

Reference

First name

Last name

E-mail address

Telephone number

This information is in the database.

What I try to do is that when the first text field ''Reference'' is filled, the related information is selected from the database and automatically put in the other corresponding text fields.

Anybody any idea how to do this?

Autofill form text fields from database

I don't use ASP, but the simple way to approach this problem is to have two pages. The first page contains a form with a text field for Reference and a submit button. Set the form's method to GET, and the action to the page that contains the full form.

In the page that contains the full form, create a recordset to select the details from the database, using the URL parameter for Reference as a filter. You can then bind the results from the recordset to the value attributes of the remaining form fields.

Autofill form text fields from database

You should be able to get close to what you are looking for in Dreamweaver by going to the ''Data'' tab and using the update record wizard.

Lawrence聽聽 *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF

No comments:

Post a Comment