checkbox - coldfusion check mark all boxes in list -
I have a form with a dynamic table. When it is calculated for some calculation then I need the checkboxes that were checked origninally to check again. I will bring back a list of sq_claim_ids that has delimited # # form.number with a comma, I can locate the syntax to make the cold load through the list and mark each mark which is in the price list. I know that I should use the CFIF tag but I do not know what is the correct syntax for the rest of the need.
& Lt; / TD & gt; & Lt; TD ALIGN = "CENTER" & gt; #Inventory_Database # & lt; / TD> & Lt; TD ALIGN = "CENTER" & gt; # Seq_claim_id # & lt; / TD> & Lt; TD ALIGN = "CENTER" & gt; # MonthsClosed # & lt; / TD> & Lt; TD ALIGN = "CENTER" & gt; # Amount_Rcvd_by_FRG # & lt; / TD> & Lt; TD ALIGN = "CENTER" & gt; #commission_atmitted # & lt; / TD> & Lt; TD ALIGN = "CENTER" & gt; #net_recovery # & lt; / TD> & Lt; / TR & gt; & Lt; / CFOUTPUT & gt; & Lt; Cfif (form.number) NEQ "" & gt; & Lt; Cfloop index = "i" list = "# form.number #" delimiters = "," & gt; & Lt; / Cfif>
Try this concept.
& lt; Cfset Lang_list = "C, C ++, Java" & gt; & Lt; Cfoutput & gt; & Lt; Form method = "post" & gt; Favorite programming language: & lt; Cfloop list = "# lang_list #" index = "i" & gt; & Lt; Cfif structkeyeyxists (FORM, "fav") and listFind (FORM.fav, i) & gt; & Lt; Cfset isChecked = "check" & gt; & Lt; Cfelse & gt; & Lt; Cfset isChecked = "" & gt; & Lt; / Cfif> & Lt; Input type = "checkbox" name = "faav" value = "# i #" # narrow # & gt; # I # & lt; / Cfloop & gt; & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Form & gt; & Lt; / Cfoutput & gt;
Comments
Post a Comment