1 Reply Latest reply on Jan 5, 2007 10:53 AM by irhusker

    Bind VALUE to cfselect

    irhusker Level 1
      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!
        • 1. Re: Bind VALUE to cfselect
          irhusker Level 1
          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#'};
          count = count + 1;
          market_group.dataProvider = groups;

          <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>