LeadOnForm – Salesforce Integration

Description

LeadOnForm sends selected form fields from WordPress to Salesforce using Salesforce’s API. Credentials are configured in the WordPress administration area and are not placed in browser-side JavaScript.

Features:
* Separate Salesforce Sandbox and Production configuration.
* Test Salesforce connectivity from the WordPress admin.
* Generic HTML forms using CSS classes such as sf-FirstName, sf-LastName, sf-Company, and sf-Email.
* Optional Contact Form 7 integration using the salesforce_lead hidden field set to 1.
* Updates an existing unconverted Lead when a matching email is found; otherwise creates a Lead.
* Basic anti-spam honeypot and IP-based request limiting.
* Privacy-conscious, bounded event log in the admin area.
* Documented extension hooks for optional add-ons.

Salesforce is a trademark of Salesforce, Inc. LeadOnForm is an independent project and is not affiliated with or endorsed by Salesforce, Inc.

Generic HTML forms

Add the class salesforce-lead-form to a form. Add Salesforce field classes to the corresponding fields, for example:

  • sf-FirstName
  • sf-LastName
  • sf-Company
  • sf-Email
  • sf-MobilePhone

The LastName and Company fields are required by Salesforce Lead creation. Configure your Salesforce org to accept the fields you send.

Contact Form 7

For forms that should be sent to Salesforce, include a hidden field named salesforce_lead with value 1 and use the supported sf- field classes. Other Contact Form 7 forms are not opted in by this plugin.

Extension hooks

LeadOnForm provides these hooks for optional extensions:

  • leadonform_submission_completed — receives one associative array after a successful Lead create/update.
  • leadonform_submission_failed — receives one associative array after a submission error.

The event payload includes metadata such as request_id, environment, status, operation, http_status, salesforce_id (on success), error_code (on failure), route, and occurred_at. It intentionally excludes form field values, full email addresses, OAuth tokens, and client secrets. These hooks are intended for add-ons that need to record events or generate reports. Extensions should not assume that an event contains personal data or raw Salesforce error details.

Privacy

The plugin sends form fields selected by the site administrator to the Salesforce instance configured by that administrator. The plugin stores configuration and a bounded event log in the WordPress database. The log masks email addresses and does not store the complete submitted form payload. Site administrators are responsible for configuring their Salesforce connection, providing appropriate privacy notices, and complying with applicable laws and their own data-retention policies.

Installation

  1. Upload the leadonform folder to the /wp-content/plugins/ directory, or install the ZIP through Plugins > Add New Plugin > Upload Plugin.
  2. Activate LeadOnForm.
  3. Open LeadOnForm in the WordPress admin.
  4. Configure the Salesforce Sandbox or Production credentials and save.
  5. Test the connection before sending real leads.
  6. Add the required sf- CSS classes to form fields or configure the Contact Form 7 opt-in field.

FAQ

Does this plugin work without Contact Form 7?

Yes. Generic HTML forms can use the salesforce-lead-form class and sf- field classes.

Does it send every Contact Form 7 form?

No. Contact Form 7 forms must explicitly opt in using the salesforce_lead hidden field with value 1.

Does the plugin include a Salesforce account?

No. You must provide credentials for a Salesforce org with API access and permissions to create/update Leads.

Does it include unlimited logs or advanced reports?

No. The free version retains up to 200 recent events. The extension hooks allow separately distributed add-ons to build additional event handling, subject to their own functionality and policies.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“LeadOnForm – Salesforce Integration” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.3.3

  • Format the authentication HTTP status in the exception message for static-analysis compatibility.
  • Clarified that sanitized redirect status/message query parameters are display-only and do not change state.

1.3.2

  • Normalized HTTP response status codes before use in error handling.
  • Added explicit static-analysis annotations for admin request values that are nonce-verified or display-only.
  • Updated the Tested up to header to 7.1; validate compatibility on that WordPress version before release.

1.3.1

  • Removed raw Salesforce response bodies from exception messages.
  • Improved IP address sanitization for rate limiting.
  • Removed development error logging from normal plugin execution.
  • Added the required Tested up to readme header.
  • Documented nonce handling for the WordPress Settings API sanitizer.

1.3.0

  • Renamed the public-facing plugin to LeadOnForm.
  • Added documented success and failure hooks for future extensions.
  • Added readme documentation and GPL license metadata.

1.2.1

  • Added honeypot and IP-based rate limiting.