Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

bind with cfselect

Participant ,
Aug 25, 2008 Aug 25, 2008
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:
TOPICS
Advanced techniques
327
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 25, 2008 Aug 25, 2008
Look at your cfselect named activity. Do you see anything named "id"? I don't.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 25, 2008 Aug 25, 2008
LATEST
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>
<cfselect name="date" bind="{activity:act_id}">
<option name="#activity.act_id#">#activity.date#</option>
</cfselect>

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?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources