Ok, I’m kinda struggling with this again, trying to bend my brain around it, so please bear with me
I have a dittoed product list with just one template, which looks like this:
<div id="product">
<a name="[+id+]"><div id="product_name" class="text">
[+pagetitle+]
</div></a>
<div id="product_number" class="text">
[+product_number+]
</div>
<div id="product_image">
[+image+]
</div>
<div id="product_info" class="text">
[+content+]
</div>
<div id="variables" class="text">
<input type="checkbox" name="variableName[]" value="[+longtitle+]: [+pagetitle+]" eform="[+pagetitle+]::1"/>
Choose product, <input type="text" name="amount[]" maxlength="3" size="3" eform="amount::" /> items.
</div>
</div>
And in the report I have the following:
...
<tr valign="top"><td>I'd like to order the following products:</td><td>[+variableName+]</td></tr>
<tr valign="top"><td>Number of items:</td><td>[+amount+]</td></tr>
...
The [+variableName+] prints out the products just fine separated by comma and a space, and the same with [+amount+].
What I’d like to be able to do (now) is to have the products printed like this
product1
product2
etc..
and that I’m able to do by putting
in the checkbox tag like this: value="[+longtitle+]: [+pagetitle+]<BR>"
So fine, now I’m a bit closer to a solution, which is to have BOTH the [+variableName+] AND [+amount+] displayed with line breaks in a two columns next to each other. Like this:
PRODUCT1 AMOUNT
PRODUCT2 AMOUNT
But how can I include
in [+amount+] variable?
(Yeah, I could use a dropdown menu with value="[+amount+]
", but I was having problems with "extra amounts" with no product selected outputted in the report.)
Does all this make any sense? Am I doing things the hard way again?
EDIT: Would it work if I used a dropdown menu with blank first value like this
<option value=""></option>
<option value="1<br>">1</option>
? That would get rid of the "ghost" amounts with no products selected.. Hmm.