hi,
using multiplier container I built a form with a dropdown and an input field in which I have called id by = gcb , that remains constant.
when I create a new record with multiplier I wish you duplicate only the value of the drop and maintained fixed the id.
the script of this form:
on submit, however, I can not enter value of the id
debugger:
Regards
Cornelio
using multiplier container I built a form with a dropdown and an input field in which I have called id by = gcb , that remains constant.
when I create a new record with multiplier I wish you duplicate only the value of the drop and maintained fixed the id.
the script of this form:
<?php
$keys = \GCore\Libs\Arr::getVal(\GCore\Libs\Arr::getVal($form->data, explode(".", "path_codice")), explode(".", "[n].ad_codice"));
$values = \GCore\Libs\Arr::getVal(\GCore\Libs\Arr::getVal($form->data, explode(".", "path_codice")), explode(".", "[n].ad_descrizione_ana"));
$options = array_combine($keys, $values);
$field = array (
'name' => 'ademp_soggetti[__N__][id_codice_ademp_soggetto]',
'id' => 'id_codice_ademp_soggetto-__N__',
'options' =>
array (
0 => 'No',
1 => 'Yes',
),
'empty' => '',
'values' =>
array (
),
'label' =>
array (
'text' => 'CodiceAdemp # __N__',
'position' => 'top',
),
'sublabel' => '',
'multiple' => '0',
'size' => '',
'class' => '',
'title' => '',
'style' => '',
'params' => '',
':data-load-state' => '',
':data-tooltip' => '',
'type' => 'dropdown',
'container_id' => '12',
);
$field["options"] = $options;
echo \GCore\Helpers\Html::input($field["name"], $field);
?>
id:<input type="text" name="id_cliente[]" id="id_cliente[]" value="<?php echo $form->data['idclientex'];?>" class="SS form-controll"/>
on submit, however, I can not enter value of the id
debugger:
Array
(
[cont] => lists
[ccname] => elenco_soggetti
[act] => view
[gcb] => 938
[chronoform] => copia3-sia-config-ademp-clienti-fields-multiplier2
[event] => submit
[ademp_soggetti] => Array
(
[0] => Array
(
[id_codice_ademp_soggetto] => AD001
)
[2] => Array
(
[id_codice_ademp_soggetto] => AD014
)
[3] => Array
(
[id_codice_ademp_soggetto] => AD001
)
[id_cliente] => 338 this is n. of record !
)
[id_cliente] => Array
(
[0] => 938
[1] => 938
[2] => 938
)
[button5] => Registra
Regards
Cornelio