Hello,
I'm looking for a snippet of code or an idea about how to display the values retrieved from a repeat group available in a multi page form.
Think of a shopping cart that include buyers data, buyers products (this is the repeat group), shipping and payment methods, each group visible on a single page in form.
On the checkout page (also a single page) i have a calc element that should display the values from the repeat group. i searched the forum to find some help, but i don't know why i can't make it work.
The only way i can display something in the calc element is by using the placeholder, but it will display only the selection from the first group. I tried this code, but i get the message 'undefined'..
I also tried this code, but for this i don't get any value, might be because i don't have Fabrik 3.2 installed (the update broke my website so i had to revert it to a stable version for this website)
Thank you
I'm looking for a snippet of code or an idea about how to display the values retrieved from a repeat group available in a multi page form.
Think of a shopping cart that include buyers data, buyers products (this is the repeat group), shipping and payment methods, each group visible on a single page in form.
On the checkout page (also a single page) i have a calc element that should display the values from the repeat group. i searched the forum to find some help, but i don't know why i can't make it work.
The only way i can display something in the calc element is by using the placeholder, but it will display only the selection from the first group. I tried this code, but i get the message 'undefined'..
Code:
$vals='{aplicatii_comenzi_telefoane_467_repeat___categorie_produs}';
$selected = array();
forech ($vals as $val) {
if ($val != 0) {
$selected[] = $val;
}
}
$msg = implode("\n", $selected);
return $msg;
Code:
$foo = FabrikWorker::JSONtoData($data['aplicatii_comenzi_telefoane_467_repeat___categorie_produs'], true);
return implode(',', $foo);