Skip to main content
August 16, 2007
Answered

Bind

  • August 16, 2007
  • 2 replies
  • 342 views
How to bind a select value to a input field.
I have this select

<CFSELECT NAME="FoodName" VALUE="Id" QUERY="AllFoods" DISPLAY="Name">

Then I would like to show the id from the item selected.

<CFINPUT TYPE="Text" NAME="FoodId" SIZE="4" BIND="{FoodName.Name}">

But the output is FoodName,FoodName

How do I bind to the select so that the input field shows the id of the selected item?
This topic has been closed for replies.
Correct answer
Ok, I found out why I did have a comma seperatd list.

I did have 2 cfselect's with the same name

2 replies

Correct answer
August 19, 2007
Ok, I found out why I did have a comma seperatd list.

I did have 2 cfselect's with the same name
August 18, 2007
BUMP..

No one that can answer this.

Maby it's an error in cfselect. I have now man ged to return only one value. But it also returns a comm like (4,) this is verry annoing because my other inputfelt expects a integer and not a string.
Why does it return a comma?