programmatically specifying form variable value

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default programmatically specifying form variable value

    I have this:


    <cfloop index="i" from= "1" to= "100" Step="1">
    <cfif isdefined("form.item_number_" & "#i#")>
    <tr>
    <td>
    <input type=text name="item_Quantity_" & "#i#" value="">
    </td>
    </tr>
    </cfif>
    </cfloop>

    and everything works except the value.

    I want it to represent the value of a passed-in variable such as

    "#form.item_quantity_1#" (on the 1st line) and
    "#form.item_quantity_2#" (on the 2nd pass of the loop)


    There must be some way to concatenate the loop counter to create the
    value, since it works fine with the field name.

    Thanks
    Chris Kemp Guest

  2. Similar Questions and Discussions

    1. Use of text Boxes to programmatically update a PDF form
      Hello all; I am a very experienced programmer but I do not have much experience with PDFs , Acrobat, etc. I have come up with what I believe...
    2. Cannot pass form field variable from Flash form to CFC
      hello, could someone please help me with an issue i'm having.... i'm trying to pass data from flash form fields into my coldfusion component...
    3. Form and URL variable
      I am trying to access a template from both the #form.city# and then from #URL.city# on other templates. The details.cfm does a lot of processing...
    4. localizing web form without setting values programmatically
      Hello I have to start an Asp.net project that involves i18n, so I was doing some reading on the subject. I'm not sure (and I *really* hope I'm...
    5. change web form content type programmatically
      I have user controls(.ascx) programmed to function as modules on the same page - default.aspx. As you would be well aware, default.aspx has the...
  3. #2

    Default Re: programmatically specifying form variable value

    #FORM["item_Quantity_" & i]#

    HTH

    --
    Tim Carley
    [url]www.recfusion.com[/url]
    [email]info@NOSPAMINGrecfusion.com[/email]
    Mountain Lover Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139