Ive been trying to get help with this for over a month now. I think there is something wrong with the php im using to call the cf_id of a table row and post it to the next form in the multipage set, so each form will save the data to the one table.
I've altered the code posted by Bob in a previous forum post to apply to my forms.
<input type='hidden' name='nomination_form_2010_mother' id='nomination_form_2010_mother' value='<?php echo $MyForm->formrow->name; ?>' />
<?php
$cf_id =& JRequest::getString('cf_id', '', 'post');
if ( !$cf_id ) {
$section_5 =& JRequest::getString('nomination_form_2010_mother', '', 'post');
if ( $section_5 ) {
$formData =& CFChronoForm::getInstance($section_5);
$data =& $formData->tablerow['jos_chronoforms_nomination_form_2010_mother'];
$cf_id = $data->cf_id;
}
}
echo "<input type='hidden' name='cf_id' id='cf_id' value='".$cf_id."' />";
}
?>
the database table = jos_chronoforms_nomination_form_2010_mother
mother form name = nomination_form_2010_mother
step 1 = section_1
step 2 = section_1_education
step 3 = section_2
step 4 = section_3
step 5 = section_4_ref_1
step 6 = section_4_ref_2
step 7 = section_5
does the 'step_name' in the below code, relate to the name of the mother form, or the individual step name of the form?
<input type='hidden' name='step_name' id='step_name' value='<?php echo $MyForm->formrow->name; ?>' />
I've tried it both ways and regardless of the name which ever child form contains this code will load a black screen. The following debugging information appears; - submit step one, proceed to step 2 with cf_id php attached to step two.
Posted: Array ( [nominee_name] => lksjdlaks [nominee_surname] => kjsdlkfjalkj [nominee_address] => lakfjlaskfj [nominee_suburb] => ldkfj [nominee_postcode] => 9088 [nominee_email] => [email]jessicas@southeren.com[/email] [nominee_home] => 456 [nominee_work] => 546 [nominee_mobile] => 456 [nominee_dob] => 45645666 [radio0] => Female [button_nominee] => Submit [1859978917f3e2cf5ae622527cf5f277] => 1 [1cf1] => 097fc4456ab5baccfccc0f1a1a4eb744 [chronoformname] => nomination_form_2010_mother )
Files: Array ( )
Current step: 1
1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [nominee_name] => lksjdlaks [nominee_surname] => kjsdlkfjalkj [nominee_address] => lakfjlaskfj [nominee_suburb] => ldkfj [nominee_postcode] => 9088 [nominee_email] => [email]jessicas@southeren.com[/email] [nominee_home] => 456 [nominee_work] => 546 [nominee_mobile] => 456 [nominee_dob] => 45645666 [radio0] => Female [button_nominee] => Submit [1859978917f3e2cf5ae622527cf5f277] => 1 [1cf1] => 097fc4456ab5baccfccc0f1a1a4eb744 [chronoformname] => nomination_form_2010_mother )
6. $_FILES Array: Array ( )
7. Form passed the plugins step (if enabled) OK
Obviously, users are unable to proceed to the next step as no form is being displayed in order to continue to submit.
Bob has suggested that this may be becuase there is an error in the php, I however do not know enough about php to know where the mistake lies, if there is one.
I need assistance Urgently, and any help what so ever will be greatly appreciated.
Annoyingly, I had this working before, but due to caching delays, and a corrupted table forcing me to start again, I have been unable to recreate the code situations that allowed this to work.