Access UID from "On Submit code - after sending email"

srthomas 25 Jan, 2011
Hi all,

Guess the subject says it all, can anyone help me access the uid field that's written to the DB from within the "On Submit code - after sending email" section?

Cheers,
Steve
Max_admin 27 Jan, 2011
Hi Steve,

Please show me your "Auto generated" code under the "Auto generated" tab in your form "Edit" page.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
srthomas 27 Jan, 2011
Hi Max,

I've done some further digging and managed to achieve what I wanted... I needed to modify the run order so that the OnSubmit code ran after the auto generated code. I have the following in the onSubmit section, which works well for me.

<p>Thank you, your Question has been created successfully.</p>
<?php 
$MyForm =& CFChronoForm::getInstance('Create_Question');
$id = $MyForm->tablerow["jos_chronoforms_question_input2"]->cf_id;


I was then able to do what I wanted as I had the auto incremented value from the database

Thanks, hope the above is useful for others
This topic is locked and no more replies can be posted.