Hi Everyone,
I hope you can help me understand the world of checkboxes.
I am confused on how I can make this work.
I am displaying list of data based upon the following query.
<CFQUERY NAME="GetTasks" DATASOURCE="intranet" DBTYPE="ODBC">
SELECT Tasks.ProjectID, Tasks.TaskID, Tasks.Customer, Tasks.jobtype, Tasks.labor, Tasks.travel, inventoryused.projectID, inventoryused.partstaskid, inventoryused.tasktype, inventoryused.partname, inventoryused.partdescription, inventoryused.qty, inventoryused.price
FROM Tasks, inventoryused
WHERE tasks.PROJECTID = #ProjectID# AND inventoryused.projectid = #ProjectID#
</CFQUERY>
One of the columns is a checkbox that I would like the user to be able to check (And there maybe multiple) click the continue button. The following code is the list where they can check.
<CFOUTPUT>
<TR>
<TD NOWRAP CLASS="DataTD" ID="firstcolumnsolid"><FONT CLASS="DataFont"><input name="billed" type="checkbox" value="Yes" /></FONT></TD>
<TD NOWRAP CLASS="DataTD" ID="firstcolumnsolid"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.TaskID#</FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.Customer# </FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.JobType#</FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><FONT CLASS="DataFont">#GetTasks.Labor#</FONT></TD>
<TD NOWRAP CLASS="DataTD"><FONT CLASS="DataFont">#GetTasks.Travel#</FONT></TD>
<TD NOWRAP CLASS="DataTD"> </TD>
<TD NOWRAP CLASS="DataTD"> </TD>
<TD NOWRAP CLASS="DataTD" ALIGN="right" ID="lastcolumnsolid"> </TD>
<TD NOWRAP CLASS="DataTD" ALIGN="right" ID="lastcolumnsolid"> </TD>
</TR>
</CFOUTPUT>
And this is where I get confused, because I think my next step is to have a <CFIF IsDefined(Form.billed)> on my action page. Which would update the field on the database to a yes.
Am I doing this correctly? Or am I way off base?
Thanks John
I hope you can help me understand the world of checkboxes.
I am confused on how I can make this work.
I am displaying list of data based upon the following query.
<CFQUERY NAME="GetTasks" DATASOURCE="intranet" DBTYPE="ODBC">
SELECT Tasks.ProjectID, Tasks.TaskID, Tasks.Customer, Tasks.jobtype, Tasks.labor, Tasks.travel, inventoryused.projectID, inventoryused.partstaskid, inventoryused.tasktype, inventoryused.partname, inventoryused.partdescription, inventoryused.qty, inventoryused.price
FROM Tasks, inventoryused
WHERE tasks.PROJECTID = #ProjectID# AND inventoryused.projectid = #ProjectID#
</CFQUERY>
One of the columns is a checkbox that I would like the user to be able to check (And there maybe multiple) click the continue button. The following code is the list where they can check.
<CFOUTPUT>
<TR>
<TD NOWRAP CLASS="DataTD" ID="firstcolumnsolid"><FONT CLASS="DataFont"><input name="billed" type="checkbox" value="Yes" /></FONT></TD>
<TD NOWRAP CLASS="DataTD" ID="firstcolumnsolid"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.TaskID#</FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.Customer# </FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><A HREF="/intranet/projecttracking/taskdetails.cfm?Reason=Modify&ProjectID=#ProjectID#&TaskID=#TaskID#"><FONT CLASS="DataFont">#GetTasks.JobType#</FONT></A></TD>
<TD NOWRAP CLASS="DataTD"><FONT CLASS="DataFont">#GetTasks.Labor#</FONT></TD>
<TD NOWRAP CLASS="DataTD"><FONT CLASS="DataFont">#GetTasks.Travel#</FONT></TD>
<TD NOWRAP CLASS="DataTD"> </TD>
<TD NOWRAP CLASS="DataTD"> </TD>
<TD NOWRAP CLASS="DataTD" ALIGN="right" ID="lastcolumnsolid"> </TD>
<TD NOWRAP CLASS="DataTD" ALIGN="right" ID="lastcolumnsolid"> </TD>
</TR>
</CFOUTPUT>
And this is where I get confused, because I think my next step is to have a <CFIF IsDefined(Form.billed)> on my action page. Which would update the field on the database to a yes.
Am I doing this correctly? Or am I way off base?
Thanks John