I use a form with database connectivity.
After the form is submitted, I need to know what record is the latest. is there somewhere in the POST parameters information about the most current record?
Regrds, Bert
After the form is submitted, I need to know what record is the latest. is there somewhere in the POST parameters information about the most current record?
Regrds, Bert
Hi Bert,
You could use something like this in the "onSubmit after email" code:
You'll have to replace the 'jos_chronoforms_myform' with the actual name of your database table, and cf_id with the name of the primary key within this table. You'll also have to make sure that the Runorder for the form is set such that autogenerated code is run before the onsubmit code.
/Fredrik
You could use something like this in the "onSubmit after email" code:
<?
$id = $MyForm->tablerow['jos_chronoforms_myform']->cf_id;
echo "Insert ID is: " . $id;
?>You'll have to replace the 'jos_chronoforms_myform' with the actual name of your database table, and cf_id with the name of the primary key within this table. You'll also have to make sure that the Runorder for the form is set such that autogenerated code is run before the onsubmit code.
/Fredrik
This topic is locked and no more replies can be posted.
