I have a form that asks the user for a quantity. This quantity is used to check the checkboxes on the action page. Here is code example for the action page:
<cfparam name="Form.quantity" default="">
<cfif Form.quantity GT '0'>
<cfset client.quantity_token = 'Y'>
<cfelse>
<cfset client.quantity_token = 'N'>
</cfif>
<cfoutput query="search">
<cfif client.quantity_token EQ 'Y'>
<cfif Form.quantity GTE #search.Recordcount#>
<cfif #search.phone# EQ ''>
<INPUT TYPE="checkbox" value="#search.id#" name="id" checked>
<cfelse>
<INPUT TYPE="checkbox" value="#search.phone#" name="phone" checked>
</cfif>
<cfelse>
<cfif #search.phone# EQ ''>
<INPUT TYPE="checkbox" value="#search.id#" name="id">
<cfelse>
<INPUT TYPE="checkbox" value="#search.phone#" name="phone">
</cfif>
</cfif>
<cfelse>
<cfif #search.phone# EQ ''>
<INPUT TYPE="checkbox" value="#search.id#" name="id">
<cfelse>
<INPUT TYPE="checkbox" value="#search.phone#" name="phone">
</cfif>
</cfif>
<a href="editdata.cfm?id=#search.id#&phone=#search.phone#" target="MainFrame">#id#</a>
#name#
#phone#
#house_number# #street_name#
#city#
#STATE#
#ZIP#-#ZIP4#</cfoutput>
</cfoutput>
The code above is checking all the checkboxes if the quantity requested is greater than or equal to the record count of the query. Which is good. But Im stuck on the the 2nd part, taking the quantity requested say 100 but still displaying 200 with 100 of the 200 checkboxes checked. Any help would be awesome. Thanks.