Get value after DB save

jhdesign 30 Aug, 2011
I'd like to include ID field from DB table after DB save and include it in an email.

Is there a variable to access the stored DB fields?

Jacob
GreyHead 30 Aug, 2011
Hi Jacob,

Yes there is:

The array key under which the saved data array will exist after the save process. e.g:$form->data['model_id']



The default value of 'model_id' is 'chronoform_data' so you probably need:
$form->data['chronoform_data']['input_name'];

Bob
jhdesign 30 Aug, 2011
Bob, how can I include such variable output on an email?
GreyHead 30 Aug, 2011
Hi Jacob,

Either add
<?php echo $form->data['chronoform_data']['input_name']; ?>
in the Email template - as long as you aren't using the Rich Text Editor as that will remove the <?php tags.

Or drag in a Custom Code action before the Email action and put this in it
<?php
$form->data['some_name'] = $form->data['chronoform_data']['input_name'];
?>
Then you can use {some_name} in the Email template.

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