SalukiTECH
Member
I am trying to work with the PHP form plug-in to use data from the form which may or may not have a repeating group in it to create a text file.
Here is what I currently have that works for a single order submission, but when a repeating group is added into the mix I want to break it out more instead of listing the array data.
I know in working with e-mail HTML templates you have to do the following:
But how can I incorporate that into the PHP code part?
Any help or examples would be great as I have yet to find much on this in the forums.
Here is what I currently have that works for a single order submission, but when a repeating group is added into the mix I want to break it out more instead of listing the array data.
Code:
$content = "###########################
# License File
# Order ID - {customer_orders___id}
###########################
LICENSE
customer={customer_orders___sub_account_name}
{customer_orders_10_repeat___product} {customer_orders_10_repeat___max_version}
options={customer_orders_10_repeat___options}
issued={customer_orders_10_repeat___license_start}
{customer_orders_10_repeat___license_expiration}
";
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/licenses/{customer_orders___id}_{customer_orders___ma_account}_{customer_orders___sub_account_name}.lic","wb");
fwrite($fp,$content);
fclose($fp);
I know in working with e-mail HTML templates you have to do the following:
Code:
$repeatcount = $this->data['fabrik_repeat_group'][#];
for($i=0; $i<$repeatcount; $i++ )
But how can I incorporate that into the PHP code part?
Any help or examples would be great as I have yet to find much on this in the forums.