Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I put this into a table

Participant ,
Oct 22, 2008 Oct 22, 2008
I have the following code inside a table.

<table border="0" width="760">
<tr>
<td class="TitleText">
<cfoutput query="qrySerialNumbers" group="materialNumber"><b>Material Number:</b> #materialNumber#<p>
<cfloop from="1" to="#quantity#" index="i">
<cfif #len(i)# is 1>
<b>Serial Number #i#:</b>    <cfinput type="text" name="serialNumber" required="Yes" Message="Serial Number must be entered."><input type="hidden" name="gfmPartNumberID" value="#gfmPartNumberID#"><br>
<cfelse>
<b>Serial Number #i#:</b>  <cfinput type="text" name="serialNumber" required="Yes" Message="Serial Number must be entered."><input type="hidden" name="gfmPartNumberID" value="#gfmPartNumberID#"><br>
</cfif>
</cfloop>
<p>
</cfoutput>
</td>
</tr>
</table>

It gives me the desired output layout and the data is correct.

But I want to put in the <td> and <tr> tags to make each line a proper table format so that I can control the spacing, instead of using   The output layout should be the same as what I have now.

I cannot seem to get this to work.
211
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 22, 2008 Oct 22, 2008
LATEST
You currently have the entire query being outputted inside a single table cell.

You might want something like this:
<table>
<cfoutput query="something" group ="whatever">
<tr><td>#grouped data#</td>
<td><cfoutput>#ungrouped data#<br></td>
</tr>
</cfoutput>
</table>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources