To save data you will need to create a database table that includes columns for all of the fields on all of the steps. You need to do this by hand, ChronoForms will not automate it. If one child has more fields than the others you can use this as the basis - select the check-box by the form in the Forms Manager, click the Create Table icon and use the Add Another Field button to add the remaining fields.
Enable the DB Connection in the mother form only.
If you want to save data on intermediate steps this is possible. If you enable the DB Conenction on the same table in the Child steps then the data will be saved but each save will be in a separate record. To keep the saves in the same record you need to pass the record id to the next step. Assuming you use the ChronoForms cf-id add this code to the Form HTML in the child form for Step 2
<?php
$MyForm =& CFChronoForm::getInstance();
$data = $MyForm->tablerow['jos_chronoforms_test_form_8'];
?>
<input type='hidden' name='cf_id' value='<?php echo $data->cf_id; ?>' />
This will add the value of the new record into a hidden field.Bob
When I try to use this code in the html field, I get an error after saving the step2 form:
Fatal error: Class 'ChronoForm' not found in /www/apache/domains/www.megaherts.ee/htdocs/administrator/components/com_chronocontact/admin.chronocontact.php(2426) : eval()'d code on line 2
<?php
$MyForm =& CFChronoForm::getInstance();
$data = $MyForm->tablerow['jos_chronoforms_multitest'];
?>
<input type='hidden' name='cf_id' value='<?php echo $data->cf_id; ?>' />
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">step2</h1>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">step2</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_4" name="text_4" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_5" type="submit" />
</div>
<div class="cfclear"> </div>
</div>