2 Replies Latest reply on Aug 25, 2008 10:18 AM by wam4

    bind with cfselect

      I need to create two drop down boxes that are dependent on each other. The first box needs to display the activities and the second should populate after the user has selected the activity from the first drop down and should display the dates. I'm running the query on the page since I need to pass a URL variable to the query. I've hardcoded the variable to test the query and it seems to run OK.

      I'm definitly not setting up the bind correctly. The error message is "Element ID is undefined in "Activity" (Activity is the name of the cfselect name field). And I may actually have two problems since when I comment out the 2nd cfslect that contains the bind, I get the full list of activities and not just the disctinct ones. I've tried adding "distinct a.act_id" in the query but it doesn't display any differently.

      Thanks for the help,

      Here's my code:
        • 1. Re: bind with cfselect
          Dan Bracuk Level 5
          Look at your cfselect named activity. Do you see anything named "id"? I don't.
          • 2. Re: bind with cfselect
            wam4 Level 1
            Good suggestion but still have the same problem after modifying it. I simplified the cfselect and changed it to :
            <cfselect name="activity" size="4" query="justofficedata" value="act_id" display="title" >
            <cfselect name="date" bind="{activity:act_id}">
            <option name="#activity.act_id#">#activity.date#</option>

            but the bind fails and the error message is still "element act_id is undefined in activity" . I've tried a number of formats on the bind section. The bind section should be the name of the cfselect name, correct?