Get id in "On Submit code - after sending email"

PicoPaco 12 Oct, 2010
Is there any way to get the current id in "On Submit code - after sending email". I have no problems getting all the other information from my cf to "On Submit code - after sending email" by using JRequest::getString('field');


Thanks

Markus
GreyHead 12 Oct, 2010
Hi Markus,

The current id of ?????

Bob
PicoPaco 12 Oct, 2010
Hi Bob

I need the id from the database insert from the cf. The idea is that I will do an update in the "On submit code"-field in the database record with data from another table and for this I need the id for the current record.
GreyHead 13 Oct, 2010
Hi Picopaco,

This should do it
<?php
$cf_id = $MyForm->tablerow["jos_chronoforms_my_form_name"]->cf_id; 
?>


Bob
jfreak53 16 Jul, 2011
Sorry to bring up an old post but I think it's better than opening a new thread for the same question. I am trying to use this same code on the "On Submit code - after sending email" part. I have all the rest of my PHP working there. But I cannot get the cf_id for some reason. This is the code I am using:

<?php
$cf_id = $MyForm->tablerow["jos_chronoforms_donacion"]->cf_id;
echo $cf_id;
?>


I have checked and double checked the table name, I copied it directly from the MySQL DB list. I also double checked and the table does have the cf_id field. I am using version 3.2.

Any ideas?
GreyHead 16 Jul, 2011
Hi jfreak53,

Please check the RunOrder tab, you have to have the 'OnSubmit block' after the 'Autogenerated Code'.

Bob
jfreak53 17 Jul, 2011
Beautiful! It's the little things in life that lack at times ha ha, thanks for the help.
This topic is locked and no more replies can be posted.