Forums

Save Form name and Form ID with DB Save

moo 24 Sep, 2012
Hello,

First of all, thank you for making ChronoForms. This is the form generator I have always been looking for!

I use the DB Save option to record all my form data to the database.
Is it possible to save the Form ID and Form Name with the DB Save function? In that case I can let several forms write to one database table and identify which form wrote wich table row. I prefer this method over using one database table for each form for specific reasons.

I have tried to find an answer on this Forum, but could not find a solution.
Best Regards,

Marcel Mooij
GreyHead 24 Sep, 2012
Hi Marcel,

You can get the form name with
$form->form_details->name

and the id with
$form->form_details->id

You can make these available to save by adding them to the $form->data array
<?php
$form->data['form_name'] =& $form->form_details->name;
$form->data['form_id'] =& $form->form_details->id;
?>


Bob
This topic is locked and no more replies can be posted.