4 Replies Latest reply on Nov 29, 2006 10:23 AM by mikeap

    Dynamic Checkbox

    mikeap Level 1
      I have a record set that returns 2 records and I need to show 15 checkboxes which are hand coded. if the either of the two values match one of the checkbox, i need to disable that checkbox and move on to the next

      the problem with the attached code is it disables the first checkbox T-03 but it does not disbale T-06 like that is in the recordset which returns T-03, T-06

      any ideas?
        • 1. Re: Dynamic Checkbox
          Kevin Schmidt Level 1
          Ok, I'm not quite sure what you are doing here. You are doing a comparison of the field to see if it is equal to a specific value?

          If you have a comma delimited value why not do something like this

          <cfif listFind(getRSM.Username, 'T-03')>

          • 2. Dynamic Checkbox
            cf_dev2 Level 1
            > I have a record set that returns 2 records

            Try a slight variation ..
            <cfset userNameList = valueList(getRSM.UserName)>
            <cfif listFindNoCase(userNameList, "T-03") gt 0>
            .. disabled..
            • 3. Re: Dynamic Checkbox
              Kevin Schmidt Level 1
              Mike - If you have a recordset that returns individual records use the valueList function to get the recordset into a comma delimited list. If you are returning a comma delimited field of values than you don't need to use the valueList.

              • 4. Re: Dynamic Checkbox
                mikeap Level 1
                Thank you so much! I'm a ASP to CF newb and I played around with ValueList and could not get it right. I had four different versions of this going to see what would work, a loop, a query output, you name it I tried it but thank you very much ... swhoo!