PDA

View Full Version : Can you create menu/list from single table?


jefferis
06-16-2010, 07:09 PM
Hi, i'm trying to create a menu select list in a form field using a dynamic list from the database. The table has ItemID ItemName ItemShortDescription as fields. The instructions appear to want to create separate tables for the parent and child but I really don't need that.
I got the 12 items to display in the box IF i add a repeating table action around the menu list field, but otherwise nothing displays.

Is there a simpler way to do this? The array behaviors don't seem to work. This is the first time I've tried to use this extension.
All I want to do is list for value ItemName and for Label the Description and have all 12 items list in the menu field.

jefferis
06-16-2010, 07:45 PM
I found a way to do this by hand using a do/while routine for a repeating table:
<select name="CatalogItems" size="6" multiple> <?php do { ?>
<option value="<?php echo $row_catlist['ItemCatID']; ?> "><?php echo $row_catlist['ItemName']; ?></option>

<?php } while ($row_catlist = mysql_fetch_assoc($catlist)); ?> </select>

Jason Byrnes
06-17-2010, 06:37 AM
no need to code this by hand, Dreamweaver will handle this for you.


In design view, select the list.

In the property inspector, click the Dynamic button.

from the "Options from recordset" List, select the recordset (catlist) you wish to use.

set the Column that should be used for the values (ItemCatID) and the column to use for the labels (ItemName).