dravalanche
11-16-2007, 05:59 PM
Hello, everybody!
I've been banging my head against a wall for the past couple weeks on this operation I'm trying to perform in Dreamweaver CS3, and, for the life of me, I can't figure out how to accomplish this. The rundown that I'm trying to do is this:
I am trying to build a form in schedule.php which adds data to the table schedule. In order to fill in some form fields, needs to be populated with information from another table (locations).
I can build a basic form that will add to the schedule table, but what's getting me is the locations fields. What I'm trying to do is work with 9 fields:
Location Name
Location Address
Location City
Location State/Province
Location Postal Code
Location Phone #
Location Fax
Location e-mail
Location website URL
What I want to do is have the "Location Name" field display as a drop-down menu, that is dynamically populated with all the entries in the "LocationName" field in the Locations table. After making the selection from the drop-down menu, I'd like to have the rest of the fields automatically populate with the information that corresponds to the selection the user makes.
Now, some of the questions/problems that come up for me are:
First, obviously, how do I get the dynamic drop-down menu populate the rest of the fields? I've tried experimenting with recordset queries with a filter based on the drop-down selection, but I couldn't get that to work (I think I may have been barking up the wrong tree, anyways).
Second, is there a way I can have the drop-down menu automatically populate the fields below upon users making their selection, or would I need to create a "Submit" button to perform that action?
After creating the record to be added to the schedule table, should I be content with creating entirely new fields in the schedule table that is populated with data that already exists in the locations table, or is there a way I can link the two in the record I'm creating in the schedules table (thus, eliminating unnecessary redundancy)?
If there's any way that this can be accomplished within DW, awesome! However, if I end up having to roll up my sleeves and code it manually, I'll try stumbling through it, either way.
Thanks for any assistance that you guys can provide, and let me know if you need more info!
-J(ay)
I've been banging my head against a wall for the past couple weeks on this operation I'm trying to perform in Dreamweaver CS3, and, for the life of me, I can't figure out how to accomplish this. The rundown that I'm trying to do is this:
I am trying to build a form in schedule.php which adds data to the table schedule. In order to fill in some form fields, needs to be populated with information from another table (locations).
I can build a basic form that will add to the schedule table, but what's getting me is the locations fields. What I'm trying to do is work with 9 fields:
Location Name
Location Address
Location City
Location State/Province
Location Postal Code
Location Phone #
Location Fax
Location e-mail
Location website URL
What I want to do is have the "Location Name" field display as a drop-down menu, that is dynamically populated with all the entries in the "LocationName" field in the Locations table. After making the selection from the drop-down menu, I'd like to have the rest of the fields automatically populate with the information that corresponds to the selection the user makes.
Now, some of the questions/problems that come up for me are:
First, obviously, how do I get the dynamic drop-down menu populate the rest of the fields? I've tried experimenting with recordset queries with a filter based on the drop-down selection, but I couldn't get that to work (I think I may have been barking up the wrong tree, anyways).
Second, is there a way I can have the drop-down menu automatically populate the fields below upon users making their selection, or would I need to create a "Submit" button to perform that action?
After creating the record to be added to the schedule table, should I be content with creating entirely new fields in the schedule table that is populated with data that already exists in the locations table, or is there a way I can link the two in the record I'm creating in the schedules table (thus, eliminating unnecessary redundancy)?
If there's any way that this can be accomplished within DW, awesome! However, if I end up having to roll up my sleeves and code it manually, I'll try stumbling through it, either way.
Thanks for any assistance that you guys can provide, and let me know if you need more info!
-J(ay)