Skip to content

Instantly share code, notes, and snippets.

@techjewel
Last active May 30, 2024 13:04
Show Gist options
  • Save techjewel/97436ac512ff9607d1ebb64af33f0d31 to your computer and use it in GitHub Desktop.
Save techjewel/97436ac512ff9607d1ebb64af33f0d31 to your computer and use it in GitHub Desktop.
Form submission success JS Event in Fluent Forms
// Event on form submission success
// You can paste this script to Form's custom JS Box
$form.on('fluentform_submission_success', function() {
// You can run your own JS and will be run on successful form submission
});
@paperbonsai
Copy link

paperbonsai commented May 30, 2024

This code snippet is a JavaScript function designed to execute specific actions upon the successful submission of a form. It uses jQuery to isten for the form submission event and integrates Facebook Pixel for tracking purposes. Here’s a breakdown of each part of the code:

$form.on('fluentform_submission_success', function() {
   fbq('track', 'Lead');
   console.log('form tracked');
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment