Form action table issue

By: michael potter | Asked: 05/12/2024
ForumsCategory: General questionsForm action table issue
michael potter asked 6 months ago
Hi All,   Hope everyone is doing well. I have the following HTM in a form email action. The action goes through fine but when i have multiple items in a repeater field the text does not go onto a new row. The text gets added with command on the same row.   Hi Team, Please find attached details of the new sale: [foreach 92][/foreach]
<table style=\"width: 100%; border-collapse: collapse; border: 2px solid black;\">
<thead>
<tr>
<th style=\"border: 1px solid black; background-color: #f2f2f2; text-align: center;\" colspan=\"4\">Hardware</th>
</tr>
<tr>
<th style=\"border: 1px solid black;\">Hardware Item</th>
<th style=\"border: 1px solid black;\">Quantity</th>
<th style=\"border: 1px solid black;\">Buy Price (ex GST)</th>
<th style=\"border: 1px solid black;\">Sell Price (ex GST)</th>
</tr>
</thead>
<tbody>
<tr>
<td style=\"border: 1px solid black;\">[96]</td>
<td style=\"border: 1px solid black;\">[99]</td>
<td style=\"border: 1px solid black;\">[100]</td>
<td style=\"border: 1px solid black;\">[110]</td>
</tr>
<tr>
<td style=\"height: 40px; border: none;\" colspan=\"4\"></td>
</tr>
</tbody>
</table>
[foreach 105][/foreach]
<table style=\"width: 100%; border-collapse: collapse; border: 2px solid black; margin-top: 40px;\">
<thead>
<tr>
<th style=\"border: 1px solid black; background-color: #f2f2f2; text-align: center;\" colspan=\"4\">Services</th>
</tr>
<tr>
<th style=\"border: 1px solid black;\">Service</th>
<th style=\"border: 1px solid black;\">Quantity</th>
<th style=\"border: 1px solid black;\">Buy Price (ex GST)</th>
<th style=\"border: 1px solid black;\">Sell Price (ex GST)</th>
</tr>
</thead>
<tbody>
<tr>
<td style=\"border: 1px solid black;\">[106]</td>
<td style=\"border: 1px solid black;\">[107]</td>
<td style=\"border: 1px solid black;\">[108]</td>
<td style=\"border: 1px solid black;\">[111]</td>
</tr>
</tbody>
</table>
Kind Regards, NOSC   Does anyone have any ideas?
1 Answers
Best Answer
Victor Font answered 6 months ago
Why do you have two tables? If you want repeater values in new rows, wrap the HTML within the foreach like this: [foreach 105]<tr><td>[106]</td><td>[107]</td><td>[108]</td><td>[111]</td></tr>[/foreach]
michael potter replied 6 months ago

Hi Victor,

Many thanks for your tip, I will give it a go!
Each table is for a different repeater field.

Thanks again.

michael potter replied 6 months ago

It worked!, Many thanks Victor

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right