0

Is there a way I can containerize web to lead code? I am creating a component where people can submit questions from their website. However, I have a number of different companies to share this code with. Also, I'm building in a CAPTCHA function for the submit button.

Would I make this a JS library and have people embed the control on a div similar to how Google Maps does it. I certainly can't display an iframe to an SFDC site. So I have to package this somehow. How can this be done?

  • That's not very clear because you say the purpose is to display the form on companies web sites, and then you talk about displaying it on SFDC sites ? What do you exctlu want to do ? Your web to lead code is just regular html, so you can use it in any way : give the code to copy and paste to your customer, make it full JS, put it on a webserver and load it with ajax (ie with oid and returl parameters)... – Emmanuel BRUNO Oct 7 '17 at 5:15
  • Sorry, I want to display it on others websites – tjcinnamon Oct 7 '17 at 21:55
0

No you can't make a package of Web to Lead code. Because in Web to Lead Salesforce handle the backside processing and create records. and when we generate the Web to Lead form Salesforce append orgId in the URL. So it will be different for all orgs.

If you still want to do something like this then you can do one thing. Create a sample HTML file of Web to Lead form and include that in static resource or document. Now create a configuration document for your client where mention all the steps so that they can modify the code of your web-to-lead form and can use that.

For the captcha part yes it would be better if you made a public API for that so that all of your customer can access it. If you want you can use token to verify users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.