Skip to main content
The snippet works on every Gravity Forms license, Basic and Pro included. It sends each submission together with the form’s field labels, so Carescale can match the fields with no manual setup. On an Elite or Nonprofit license you can use the Webhooks Add-On instead, which needs no code and sends entries that are marked Not Spam later. You need the Endpoint address and the secret from the facility’s Carescale admin.

1. Add the endpoint to wp-config.php

Add these two lines to wp-config.php, above the line that reads /* That's all, stop editing! */. Use the facility’s own values.
wp-config.php
Keep the secret here, out of the theme and out of version control.

2. Add the snippet

Create the file wp-content/mu-plugins/carescale-forms.php with the content below. A must-use plugin loads on every request and can’t be switched off by accident. If the mu-plugins folder doesn’t exist, create it.
wp-content/mu-plugins/carescale-forms.php
What it does:
  • It runs after each submission is saved, and skips entries Gravity Forms flags as spam.
  • It sends the entry plus the form’s title and fields: each field’s label, type, visible inputs and choices. Layout fields and captchas are left out.
  • It sends JSON with Authorization: Bearer and the secret, and waits up to 10 seconds.
  • When the delivery fails, it writes an error to the Gravity Forms log. Logging is off by default, so turn it on only while you troubleshoot.
To send only one form, change gform_after_submission to gform_after_submission_ followed by the form ID, for example gform_after_submission_3. For several forms, add one add_action line per form.

Limits to know

  • No retry. The snippet sends each entry once. If the site can’t reach Carescale at that moment, the entry isn’t sent. The Carescale card shows a refused delivery under Last rejected delivery. A delivery that never arrives shows nothing.
  • Not Spam entries are never sent. An entry flagged as spam is skipped. Marking it Not Spam later doesn’t run the snippet again, so enter that person as a lead by hand.
  • It runs in the visitor’s request. The visitor sees the confirmation once Carescale answers, which normally takes well under a second.
  • You maintain it. Keep the file when the site moves hosts or themes.

Test it

  1. Submit the form on the live site with made-up details: a 555 phone number and an example.com email.
  2. In Carescale, the card reads Receiving, the form appears in the forms list under its title, and a new lead is at New.
  3. Clear the test lead with Not an inquiry.
Nothing arrived? See Troubleshooting.