Hi all,
I don't understand how to save text key on dynamic dropdown, I follow the instruction from this FAQ https://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.htmlhttps://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.html
I already create chained dropdown reference by that FAQ, but, it's only save id of province , county , district, village. Not the name of them, so, how to save id and name by using dynamic dropdown?
Thanks
I don't understand how to save text key on dynamic dropdown, I follow the instruction from this FAQ https://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.htmlhttps://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.html
I already create chained dropdown reference by that FAQ, but, it's only save id of province , county , district, village. Not the name of them, so, how to save id and name by using dynamic dropdown?
Thanks
Thanks Bob,
I still confused, Do we have to create custom code on submit action or what?
I still confused, Do we have to create custom code on submit action or what?
Hi Yudhizth,
Yes, probably, there isn't enough information here to give a better answer.
Bob
Yes, probably, there isn't enough information here to give a better answer.
Bob
Hi Bob,
I have the same issue.
Three dynamic dropdown that work perfectly (regions, cities, villages).
In order to save text (region) I have added an hidden field(regione) to keep text value and put in OnSubmit section the following code (input_select_reg is the region drop down).
With debugger I can't see $regioni array and the field regione is empty.
Please can you help me?
Thank you.
I have the same issue.
Three dynamic dropdown that work perfectly (regions, cities, villages).
In order to save text (region) I have added an hidden field(regione) to keep text value and put in OnSubmit section the following code (input_select_reg is the region drop down).
<?php
$regioni = array(
1 => 'Marche',
2 => 'Abruzzo',
3 => 'Basilicata',
4 => 'Molise',
5 => 'Trentino Alto Adige',
6 => 'Puglia',
7 => 'Calabria',
8 => 'Campania',
9 => 'Lazio',
10 => 'Sardegna',
11 => 'Sicilia',
12 => 'Toscana',
13 => 'Piemonte',
14 => 'Emilia Romagna',
15 => 'Friuli Venezia Giulia',
16 => 'Valle d''Aosta',
17 => 'Veneto',
18 => 'Liguria',
19 => 'Lombardia',
20 => 'Umbria'
);
var_dump($regioni);
form->data['regione'] = $regioni[$form->data['input_select_reg']];
?>
With debugger I can't see $regioni array and the field regione is empty.
Please can you help me?
Thank you.
What does the debugger show for the value of "input_select_reg" ?
The value for "input_select_reg" is 2 in my test and "regione" is still empty:
Data Array:
Array
(
[option] => com_chronoforms
[chronoform] => SCARICABUONOSCONTO-PROV-Copy
[event] => submit
[Itemid] =>
[lang] => it
[input_text_3] => Raffaele
[input_text_4] => Russo
[input_text_7] => raffru@gmail.com
[input_select_reg] => 2
[input_select_prov] => 44
[input_select_com] => Altino
[regione] =>
[input_checkbox_17] => 1
[chrono_verification] => 2bqur
[Invia] => Invia
[838163de85b4883189707e66763c5c73] => 1
[language] => it-IT
)
Hi raffru,
You are missing the $ at the start of this line
Bob
You are missing the $ at the start of this line
$form->data['regione'] = $regioni[$form->data['input_select_reg']];
Bob
Hi,
doesn't work😟
$regione still empty.
I can't see $regioni on the screen, is var_dump($regioni) the right command?
I think that this array is not stored correctly, how can we watch the array?
doesn't work😟
$regione still empty.
I can't see $regioni on the screen, is var_dump($regioni) the right command?
I think that this array is not stored correctly, how can we watch the array?
Here is:
https://www.quattrozampeinfiera.it/it/?option=com_chronoforms&chronoform=SCARICABUONOSCONTO-PROV-Copy
The form will send an email to your address with an attachment (just to know😉 ) saving the data.
Thank you.
https://www.quattrozampeinfiera.it/it/?option=com_chronoforms&chronoform=SCARICABUONOSCONTO-PROV-Copy
The form will send an email to your address with an attachment (just to know😉 ) saving the data.
Thank you.
Hi raffru,
That all looks OK apart from the missing regione. By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob
That all looks OK apart from the missing regione. By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob
Hi Bob,
I need to have an approval from the client before send to you the admin credentials (I hope that you will know).
Can I, in the meantime, send you a backup of the form?
I need to have an approval from the client before send to you the admin credentials (I hope that you will know).
Can I, in the meantime, send you a backup of the form?
Hi raffru,
This line is a problem:
Bob
This line is a problem:
16 => 'Valle d''Aosta',
See the extra quotes in the middle. The simplest fix is to change this here and in the drop-down options to say Valle dAosta - the Text part after the = can stay the same.
Bob
This topic is locked and no more replies can be posted.