blue-mouse
Member
Hi,
I try this code:
Problem is with line like this:
I have no idea how to write for fabrik field-checbox condition "If" value-'IA' is checked?
I have field-checkbox: ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}'
that have 5 checkboxes values:
IA
IB
IC
ID
IE
How to code in fabrik: 'value of the first selected checkbox'
How to code in fabrik: 'value of the second selected checkbox'
..... ?
Not in fabrik is:
$_POST['thename'][0] = 'value of the first selected checkbox';
$_POST['thename'][1] = 'value of the second selected checkbox';
Can i get any help?
I try this code:
PHP:
$db =& JFactory::getDBO();
$quantity2 = (int) '{ccjom_cc_kk_karta_rejestr___zamow_quantity_pos_ordered}';
$currentseriala = '{ccjom_cc_kk_karta_rejestr___product_serial_num2}';
$currentserial2 = filter_var($currentseriala, FILTER_SANITIZE_NUMBER_INT);
$idclone2 = (int) '{ccjom_cc_kk_karta_rejestr___id}';
$tojestkarta = 2;
$idclone4 = $idclone2 - $quantity2;
$currentserial4 = $currentserial2 - 2;
$i = 1;
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'IA')
{$a=1;}
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'IB')
{$b=1;}
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'IC')
{$c=1;}
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'ID')
{$d=1;}
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'IE')
{$e=1;}
$pace = $a + $c+ $e;
$pbd = $b + $d;
for ($i = 1; $i <= $quantity2; $i++) {
$idclone5 = $idclone4 + 1;
$idclone4 = $idclone5;
$currentserial5 = $currentserial4 + 2;
$currentserial4 = $currentserial5;
$query1 = "UPDATE `ccjom_cc_kk_karta_rejestr` SET `product_serial_num2`= " .$currentserial5. " , `rodzaj_karty_np_wzorzec` = '2', `pi_ace`= " .$pace. " , `pi_bd` = " .$pbd. " WHERE `id` = " .$idclone5. " " ;
$db->setQuery($query1);
$db->query();
}
Problem is with line like this:
PHP:
if ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}' == 'IA')
{$a=1;}
I have no idea how to write for fabrik field-checbox condition "If" value-'IA' is checked?
I have field-checkbox: ('{ccjom_cc_kk_karta_rejestr___ip_konfig2}'
that have 5 checkboxes values:
IA
IB
IC
ID
IE
How to code in fabrik: 'value of the first selected checkbox'
How to code in fabrik: 'value of the second selected checkbox'
..... ?
Not in fabrik is:
$_POST['thename'][0] = 'value of the first selected checkbox';
$_POST['thename'][1] = 'value of the second selected checkbox';
Can i get any help?
Last edited: