Copy link to clipboard
Copied
I'm trying to modify an existing PHP page (admittedly not my strongest suit) .... where certain values are dynamically fed via a functions.php file included in the page header.. one such field is <?=memberDropdown($_SESSION["memberProfile"]["membernumber"])?> ... and the page does retreive and display a drop down with the dynamic content as it should, but when I go to build the DW8 PHP Update behavior, it doesn't "see" the dynamic drop down. Any suggestions on how to resolve this????? Thanks!
Copy link to clipboard
Copied
Do u want to do dynamic drop down menu? Choose from Insert > Form > List/Menu. Click on it and see at properties below. You can see 'Dynamic' button with lightning icon. Click it and u will see popup window will appeared. At the 'options from recordset' field, select the recordset that u want to use. But make sure u create the recordset first. For example if u want the menu to display members from database, create recordset from members table (Server Behaviour > Recordset). Values field is what column u want to store in database and Label field is what u want to display to users.
Copy link to clipboard
Copied
Hello.. no. The dynamic drop-down that is there works just fine. THe problem is that the UPDATE behavior that DW8 generates doesn't SEE the drop-down.. there's no ID or NAME for it to use.
Copy link to clipboard
Copied
I dont understand from what u mean
>the UPDATE behavior that DW8 generates doesn't SEE the drop-down
Copy link to clipboard
Copied
Umm.. how do I explain this more clearly? In a PHP page, if I have a dynamic drop-down populated with values, that drop-down has an ID. When I use Dreamweaver to create an UPDATE behavior on the page, to update the database table, I can choose to update a specific field on the table based on the ID name of that dynamic drop-down. The Dreamweaver Behavior itself, can see the ID of that drop-down on the form, and I can assign it to update a specific field.
In the form that I'm trying to modify, there IS a dynamic drop-down (see code on original post) but because it has no ID assigned to it, the DW Behavior can't offer it as an option in the UPDATE dialog. I want to know how to work around this or fix it so that Dreamweaver can see the drop-down, and therefore I can assign the selected value.
Does that help?
Copy link to clipboard
Copied
Your solution is simple add a dynamic ID and name to the form fields. Create a dynamic list/menu as QIQ mentioned and add a dynamic name and ID to form fields from there.
Copy link to clipboard
Copied
Hello yes... I thought of that certainly, but didn't want to add more actual fields if there were subroutines already creating them once.. I just wanted to label the existing dynamic combo box and then DW would recognize it for the Update. Guess I'm out of luck...
Copy link to clipboard
Copied
Do u mean u want the drop down menu to show the respective value as stored in database when u want to update? The u just need to set the value for drop down list with the column of the table.