Forums

Wrong autogenerated code when multiple arrays

paolo 16 Jan, 2009
If the form has more than one array, the autogenerated code is wrong because only the first array name is recognized.
The problem is in the CheckForm function in admin.chronocontact.html.php line 355 and 356. The replace function only replaces the first occurrence of "[]".

To fix the problem in admin.chronocontact.html.php change the lines 355 and 356 from
				$('fieldsnames').value = fieldsnames_array.join(',').replace("[]","");
				$('fieldstypes').value = fieldstypes_array.join(',').replace("[]","");

to
				$('fieldsnames').value = fieldsnames_array.join(',').replace(/\[\]/g,"");
				$('fieldstypes').value = fieldstypes_array.join(',').replace(/\[\]/g,"");
Max_admin 18 Jan, 2009
Hi Paolo,

Thanks for the fix! it was in the bugs list so this saved sometime!🙂

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.