Formbuilder flat file problem
Posted: Tue Apr 03, 2012 6:29 pm
I have a form where you can select an item via a checkbox and type in a textfield how many of that item you wish to order.
My problem is a bit difficult to explain and I simpy can't wrap my head around it.
I need to write the result to a flat text file. But insteadt of having the file look like this:
Item name
Amount 3
I need to duplicate the result so it ends up like this
Item name
Item name
Item name
If of course the amount is 1 it shouldnt duplicate at all.
My fields looks like this:
Any help is highly appreciated 
My problem is a bit difficult to explain and I simpy can't wrap my head around it.
I need to write the result to a flat text file. But insteadt of having the file look like this:
Item name
Amount 3
I need to duplicate the result so it ends up like this
Item name
Item name
Item name
If of course the amount is 1 it shouldnt duplicate at all.
My fields looks like this:
Code: Select all
<Item name:>{$TAB}{$TAB}{if $itemname != "" && $itemname != "[mangler]" }{$itemname}{/if}
{if $amount != "" && $amount!= "[mangler]" }{$amount}{/if}