hi
i'm having trouble with an EFG form that contains 'html code' field types (which i'm using to add fieldsets/legends). the form also contains multiple pages with 'back' buttons.
when the back button is used and then the form is completed and submitted, i am getting a MySQL syntax error because the generated query has a 'blank' field name (it's hard to spot, but it's last field in the INSERT):
if you add print_r($arrSubmitted); exit; after line 539 in the file: system/modules/efg/ExtendedForm.php you can see that the session 'FORM_DATA' array contains a 'blank' element:Code:INSERT INTO tl_creative_spaces (tstamp, art_type, associations, devote_time, devote_years, artist_details, insuranceSRC, title, ) VALUES (1303796820, 'text field', 'text area - now edited by using back button', '1', '459', 'a:2:{i:0;s:10:\"practicing\";i:1;s:11:\"exhibitions\";}', 'tl_files/uploads/creative-spaces/form__40.pdf', 'another page with a text field', '')
this blank element seems to be coming from the html code fields (which do not have a 'name'). for some reason they are being stored in the session data despite this widget type having $blnSubmitInput = false;.Code:Array ( [art_type] => text field [associations] => text area - now edited by using back button [devote_time] => 1 [devote_years] => 459 [artist_details] => Array ( [0] => practicing [1] => exhibitions ) [] => [title] => another page with a text field )
as a quick fix hack, i've added unset($_SESSION['FORM_DATA']['']); after line 537, which seems to have solved the problem for now.
i think, maybe, there's a bug in EFG that is storing the 'do not submit' data in the session - possibly line 442:
but i'm not familiar enough with EFG to say for sure.Code:elseif ($objWidget->submitInput() || $strMode == 'back')


Reply With Quote
Bookmarks