E-mailing to submitter

Pipey 03 Apr, 2008
Hi - new install on J1.5. Setting it up and trying it out works great but only the admin gets the e-mail, and not the submitter. I am sure it has to do with how I fill in the parameters. I have done due diligence in this forum, the toots and I am still stymied.

I would like to receive the results of any form submissions and also have the submitter receive their submission. can you tell me how to set this up, please?
Thanks

P.S. May I also add that while I say "admin" I am not interfacing with Joomla admin on this, simply a form on a page. And I just noticed that the form data does not save to the table every submission

Post edited by: Pipey, at: 2008/04/03 03:34<br><br>Post edited by: Pipey, at: 2008/04/03 03:43
GreyHead 03 Apr, 2008
Hi pipey,

To send a copy of the email to the submitter you need to put the name of the 'email' field in the box on the 'Special Fields' tab.

If the form data doesn't save on every submission that suggests a problem with your form. Turn on DeBug and see what is being returned by the form.

Bob
Pipey 03 Apr, 2008
I managed to get my 2 e-mail destinations to work - thanks. And I have whittled it down to where only 1 field is not being captured to the data table. It is being sent by e-mail however. And on the debug page, it also is displayed. Not sure where to go from here.

pcode is the field not being shown in data table.

Array is _
POST: Array ( [name] => Andrew Kerr [address] => 8200 Shore Road West [town] => Hampton [province] => Nova Scotia [pcode] => B0S 1L0 [country] => Canada [tel_home] => 902-665-4040 [tel_work] => 866-361-5366 [email] => [email]andy@scottishcentral.com[/email] [qty_lobster] => 18 [qty_steak] => 18 [cheque] => yes [Submit] => Submit your order )
Case 1: Use table layout
E-mail: 'Yes' custom
Email sent
GreyHead 03 Apr, 2008
Hi Pipey,

Please copy & paste the 'Autogenerated code' here please. I wonder if the database postcode field is set to be an integer instead of a string?

Just a thought.

Bob
Pipey 03 Apr, 2008
<?php
$database =& JFactory::getDBO();

$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('textfield','', 'post', 'string', '' )."' , '".JRequest::getVar('address','', 'post', 'string', '' )."' , '".JRequest::getVar('town','', 'post', 'string', '' )."' , '".JRequest::getVar('province','', 'post', 'string', '' )."' , '".JRequest::getVar('postal','', 'post', 'string', '' )."' , '".JRequest::getVar('country','', 'post', 'string', '' )."' , '".JRequest::getVar('tel_home','', 'post', 'string', '' )."' , '".JRequest::getVar('tel_work','', 'post', 'string', '' )."' , '".JRequest::getVar('email','', 'post', 'string', '' )."' , '".JRequest::getVar('qty_lobster','', 'post', 'string', '' )."' , '".JRequest::getVar('qty_steak','', 'post', 'string', '' )."' , '".JRequest::getVar('cheque','', 'post', 'string', '' )."' , '".JRequest::getVar('creditcard','', 'post', 'string', '' )."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
GreyHead 03 Apr, 2008
Hi Pipey,

Looks like the field name is 'pcode' in the form and 'postal' in the database.

Easiest fix is to rename the database field and change the Autogenerated code to match.

Bob
Pipey 03 Apr, 2008
Bob - all I needed to do was change the field name in the form code back to postal and it worked. Now I am wondering about that orphan "textfield" shown in the auto code for which I have no equivalent in the form code. Any ideas?
GreyHead 03 Apr, 2008
Hi Pipey,

I don't think that there is any orphan code????

Bob
Max_admin 04 Apr, 2008
Cant see any orphan fields too, try to match your HTML code field names with the DB tables column names with the Auto code field names!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.