Make search forms friendlier by replacing text input fields with dynamic dropdowns. This tutorial shows you how quick and simple it is.
The DataAssist wizard allows you to link fields to your database creating dynamic forms, however there may come a time when you want to change a text input field to a dynamically filled dropdown field manually. The following steps show you how to do this quickly and easily.
The simple search form below has only two fields. We want to make it so that the user doesn't have to guess at the data but rather have dropdowns that display what is actually in the database.
In the Server Behaviors panel notice the two current dynamic text fields (UserID ) and (MasBarID). For now we will leave these as we can borrow some code from them.
Our first step will create a link to our database and determine which set of data we want to display in our dropdown. To do this we must create a recordset.
This step helps you speed through adding the dropdown field in the next step. You are simply getting the information you'll need in the step after this.
Here we will actually add the dropdown field and set all of its options using the information obtained in the previous step and customizing it to your needs.
Your first dynamic dropdown field is done. Now all you need to do is to remove the old textfield that is no longer needed
That's all there is to changing a dynamic text field to a dynamic dropdown. To recap, let's add the second dropdown.
If you have done everything correctly your form should now look like this and could probably be done in less time than it took to read this tutorial.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.