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

Bind VALUE to cfselect

New Here ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

New to binding so trying to get my feet wet... I'm able to bind to a cfselect however no VALUE comes through, just the name. How do I get there to also be a VALUE?

<cfformitem type="text" bind="{market_group.selectedItem.data; }" />

Thanks in advance!
TOPICS
Advanced techniques

Views

205

Translate

Translate

Report

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
New Here ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

LATEST
Sorry, I should have included the code. The code below works to populate the cfselect but no values are assigned to each entry. I would like ot have IDs populate the VALUEs but just not sure how to do this.


<cfsavecontent variable="option1">
var groups = [];
var count = 1;
<cfloop list="#allMG#" index="mgINDEX">
var count = {label:'#mgINDEX#'};
groups.push(count);
count = count + 1;
</cfloop>
market_group.dataProvider = groups;
</cfsavecontent>

<cfinput name="option1" type="checkbox" value="1" label="Market Group" onclick="#option1#" checked>
<cfformitem type="text" bind="{market_group.selectedItem.data; }" />

<cfformgroup type="page" label="Market Group" height="550" width="500" visible="yes">
<cfformitem type="text">Select the Market Groups that apply:</cfformitem>
<cfselect name="market_group" size="15" multiple="yes">
<option value="">Enable this menu by selecting Market Group on the main page</option>
</cfselect>
</cfformgroup>

Votes

Translate

Translate

Report

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
Documentation