lukeyouell / craft-salesforceleads Goto Github PK
View Code? Open in Web Editor NEWGenerate Salesforce leads from form submissions.
License: MIT License
Generate Salesforce leads from form submissions.
License: MIT License
Dear I've tried out the plugin but oid is not set via the settings tab. Even if I add the oid manually into the form code it won't post.
My form:
<form action="" method="post">
{{ csrfInput() }}
<input type="hidden" name="action" value="salesforce-leads/post">
<input type="hidden" name="lead_source" value="{{ 'Web'|hash }}">
<input type="hidden" name="Campaign_ID" value="{{ '00B0Q000000U9XmUAK'|hash }}" >
<label>Name</label>
<input type="text" name="name">
<label>Email Address</label>
<input type="email" name="email">
<input type="text" name="test" value="Halllo">
<input type="submit" value="Submit">
</form>
My response:
{"success":true,"statusCode":200,"reason":"OK","body":"\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<html>\n<head>\n<meta HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">\n<meta http-equiv=\"Refresh\" content=\"0; URL=http://local.tourneepedale.be/nl/\">\n</head>\n<script>if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('http://local.tourneepedale.be/nl/'); } else if (window.location.replace){ window.location.replace('http://local.tourneepedale.be/nl/');} else {;window.location.href ='http://local.tourneepedale.be/nl/';} </script></html>\n","payload":{"lead_source":"Web","Campaign_ID":"00B0Q000000U9XmUAK","name":"Dries Van haver","email":"[email protected]","test":"Halllo","retURL":"http://local.tourneepedale.be/nl/"}}
Hey!
Thanks for great plugin.
Is it possible to attach file to the lead record?
I need to use Pixel & Tonics contact-form plugin to send an email, but I also need to add the submission as a lead to Salesforce. I am trying to submit through AJAX and the response comes back as success and I receive the craft email, but the redirect has the craft error "There was a problem with your submission, please check the form and try again!"
Using the code from the example and page ends up on the json response.
$('#sell-form').submit(function(ev) {
// Prevent the form from actually submitting
ev.preventDefault();
$('#sell-submit-button').attr('disabled', true);
$('#sell-submit-button').html('Please Wait');
// Send it to the server
$.post({
url: '/',
dataType: 'json',
data: $(this).serialize(),
success: function(response) {
if (response.success) {
console.log('Success!');
$('#sell-thanks').show();
$('#sell-form').hide();
$('#sell-modal').delay(3000).fadeOut();
} else {
console.log('An error occurred.');
console.log(data);
$('#sell-submit-button').attr('disabled', false);
$('#sell-error').show();
$('#sell-submit-button').html('Submit Again');
}
}
});
Some bot crawled our page and created over a thousand salesforce leads. It seems like some sort of spam detector kicked in and now nothing is being posted to Salesforce.
I'm going to add in honeypot captcha to ensure this doesn't happen again but any idea how I can fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.