Custom Subject to Include Names

businessmanager 20 Nov, 2007
Hi,

I have created multiple forms in the latest version of chronoforms, which is a great product.

I have a requirement on one of those forms to include the firstname and lastname in the subject line.

Can someone tell me how I might do this or even if it is possible. I want the second form to still work, but not include this information.

Cheers,
Ben
GreyHead 20 Nov, 2007
Hi Ben,

Try something like this in the OnSubmit before Email box:
<?php
$rows[0]->emailsubject = "some text".$_POST['firstname']." ".$_POST['lastname']."more text".$rows[0]->emailsubject."even more text";
?>
but change firstname & lastname to the field names in your form.

Bob
Max_admin 20 Nov, 2007
Hi Ben,

Possible, in the Submit code before Email box please add this code :

<?php
$rows[0]->subject = $_POST['firstname_field_name'].' '.$_POST['lastname_field_name'];
?>


Take care to change the field names to yours😉

Cheers

Max<br><br>Post edited by: admin, at: 2007/11/20 14:54
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 20 Nov, 2007
Hi Bob,

You are always quicker🙂

Thanks!!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
businessmanager 21 Nov, 2007
Fantastic Support, this really is probably one of the best components for Joomla.

Thanks, worked perfectly.
This topic is locked and no more replies can be posted.