Buy Now
Sign in

Dynamic Subject in v3

calman , October 02 2013, 20:24
calman 7
October 02 2013, 20:24 #317287
ok, I read the FAQ on this, but I just can't seem to get it to work. My email is sent with no subject. Here is my setup, thanks in advance for your help.

Tab: Setup emails
Heading: Dynamic Subject
Value: dynsubject

Tab: Form Code
Heading: On Submit code - before sending email:
Value: <?php $form->data['dynsubject'] = "Contact Us Form Submitted from {$form->data['email']}"; ?>

'email' is a field name in the form.

Joomla 1.5.26
ChronoContact v3.2
GreyHead 65
October 03 2013, 13:21 #317319
Hi calman,

The FAQ is for CFv4 (as are pretty much all of them now) :-(

Try replacing this
<?php $form->data['dynsubject'] = "Contact Us Form Submitted from {$form->data['email']}"; ?>
$email = JRequest::getVar('email', '', 'post');
JRequest::setVar('dynsubject', 'Contact Us Form Submitted from '.$email);

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
calman 7
October 03 2013, 13:30 #317322
perfect, works like a charm.

Thanks Bob!