Thursday, February 23, 2012

Webform – lead entry notification in vTiger

May 6, 2010 by Ayo Akinyemi · Leave a Comment 

No notification is sent out when a form is sent via the webform. So you don’t get leads in the system that might be overlooked, you can add a custom code to the “yoursitename/vtigercrm/modules/Webforms/post.php” file :

//php start tag goes here
function isformsubmit(){
($_SERVER['REQUEST_METHOD'] == “POST”) ? return TRUE : return NULL;
}

if ((isset($_POST['firstname'])) && (isset($_POST['lastname'])) && (isformsubmit()) ){
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$subject = ‘You have a new lead’;
$body = ‘A new lead – ‘.$firstname.’ ‘.$lastname.’ @ ‘.’ ‘.$company.’ just filled out a form.’;

mail(‘info@debronk.net’, $subject, $body,
“To: Debronk < newlead at debronk dot net>\n” .
“From: New Lead Form < info at debronk dot net>\n” .
“X-Mailer: PHP 4.x”);
}
?>

Since you are posting to that file, whenever it gets called, and the specified actions exist, you get the notification.

-Using “contact” webform, you might also not get notification delivered to your contact’s email if they check the “portal option”. You can grab that info from the database and send it directly to the new contact with a custom code as well.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.