Dynamic Subject - cf_id don't work

brunolazzarini 07 May, 2012
Hello guys and girls!
My name is Bruno, I'm from Brazil and I've been learning how to use Chronoforms lately. It's a really awesome tool!

But I'm having a problem: I can't make the Dynamic Subject get the cf_id value.
I can make it work on the e-mail message with this code:

<?php
$cf_id = $form->data['chronoform_data']['cf_id'];
echo "<b>Numero do Pedido: </b>".$cf_id; ?>


But I really can't make it work on the dynamic subject!

The field "DB Save" is before the "e-mail (1)" field, so that's not the problem.

I've tried this code on the template field but it didn't work:
<?php
$id = $MyForm->tablerow["chronoform_data"]->cf_id; 
$posted['subject'] = 'some text '.$id;
?>


The Field "Dynamic Subject" is filled just with the word "subject", which is the variable defined above.

Anyone know can I solve this problem?

Sorry for the terrible English and Thanks for your attention and help! ;-)
GreyHead 12 May, 2012
Hi Bruno,

Please try changing this line
$posted['subject'] = 'some text '.$id;
to
$form->data['subject'] = 'some text '.$id;

Bob
brunolazzarini 15 Jun, 2012
Hi!

It worked very well!
Thanks a lot for your help! ;-)
This topic is locked and no more replies can be posted.