Forums

Chrono Forms email problem

MTP 15 Apr, 2011
Hello,

I am creating a annual leave request form. I have created a drop down box with the names of the people who need to verify the request.

I want users to be able to click on the persons name from the drop down menu and the form gets emailed to that person.

Does anyone know on how to do this?

I am a Joomla Apprentice so I do not know alot about Joomla yet.

Many Thanks!!!
Max_admin 17 Apr, 2011
Please check FAQ#31, it has something similar, I'm assuming that you are using V3 ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MTP 18 Apr, 2011
Hello,

thank your for your reply.

Yes I am using v3 but whenever I submit the form I get this error- Parse error: syntax error, unexpected '@', expecting ')' in C:\xampp\htdocs\iConnect\components\com_chronocontact\libraries\customcode.php(64) : eval()'d code on line 2

I have looked at this document and there is no unexpected @ anywhere.

If you could please help that would be most helpful. Let me know if you want me to attach the customcode.php file aswell.

Thanks!
GreyHead 18 Apr, 2011
Hi MTP,

The error is in the 2nd line of your OnSubmit Before Email code. Please post the code you've used there so we can take a look.

Bob
MTP 18 Apr, 2011
Hello,

Thanks for your reply.

Here is the code:
<?php$emails_2 = array('email@email.com'=>'email@email.com', 
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',
'email@email.com'=>'email@email.com',);
$MyForm =& CFChronoForm::getInstance('RequestLeaveForm');$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);$MyFormEmails->setEmailData(1, 'to', $emails_2[$_POST['recipients']]);?> 


I use XAMPP aswell which uses PHP and everytime I send a test form it says:
You must provide at least one recipient e-mail address and then lists the coding for the OnSbmit before email code.

Many Thanks!!

I appreciate your help as I am a joomla and chronoforms beginner.
GreyHead 18 Apr, 2011
Hi MTP,

You need a line-break (or at least a space) after <?php

Bob
MTP 18 Apr, 2011
Hello,

Thank you very much for your help. Who knew something like that can cause problems.

Thanks again for your help
This topic is locked and no more replies can be posted.