Auto Responders

In a lot of cases it is now just easier to script in your own email script after validation (similar to the way you would write a custom validation script). However basic auto responder functionality still exists. A few of the methods were renamed since the change from FormItBuilder. This may trip up a few people doing script conversions from FromItBuilder to JsonFormBuilder.

There is an example of an auto responder form in core/components/jsonformbuilder/docs/examples/JsonFormBuilder-autoresponder.php which shows the new methods. After creatingthe main form object, simply call the methods as shown below.

$o_form->setAutoResponderToAddress($o_form->postVal('email_address')); //this must be the field ID for your return email, NOT the email address itself
//You can also use an array of email addresses to send to multiple TO addresses.
$o_form->setAutoResponderFromName('Business Title');
//Set the email subject and content
$o_form->setAutoResponderSubject('Business Name - Thanks for contacting us!');
$o_form->setAutoResponderEmailContent('<p>Thank you for contacting us. Your submitted information is listed below.</p>{{tableContent}}<p>Thanks!</p>');
//In most cases these probably will not be used, but you can also send the responder to a CC and BCC address.