Skip to content

A basic example of submitting form data from a React.js form to the Salesforce WebToLead.

Notifications You must be signed in to change notification settings

codeadamca/react-forms-salesforce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce API and a React Contact Form

A basic example of submitting form data from a React.js form to the Salesforce WebToLead.

This eample uses the react-forms and the php-env repos as a starting point.

The Salesforce WebToLead form was intended to process an HTML form submission to add customers to the Salesforce database. The WebToLead processing was not build to work with an AJAX request and is susceptable to CORS. This example sends the form data to a PHP proxy file which sends the form data to cURL to bypass CORS.

You will need to update the .env file with your Salesforce OID and redirect URL aong with updating the fetch URL to match the location of your proxy.php file.


Repo Resources

About

A basic example of submitting form data from a React.js form to the Salesforce WebToLead.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published