Created
July 14, 2014 17:44
-
-
Save eggsurplus/e94151f9e11523f60bfd to your computer and use it in GitHub Desktop.
Partial WebToLeadCapture.php for updating existing lead
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(empty($lead->id)) { | |
$lead->id = create_guid(); | |
$lead->new_with_id = true; | |
} | |
//BEGIN - eggsurplus - update existing leads | |
if(!empty($_POST['record'])) { | |
//get the existing bean (returns null if a bad ID is passed so a new Lead will be created still) | |
$lead = BeanFactory::getBean('Leads',$_POST['record']); | |
$lead->new_with_id = false; | |
} | |
//END - eggsurplus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment