This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * A Simple Code Snippet to check if the provided email in FluentForms submission is a CRM contact and is in a block lists tags. | |
| * If yes, then it will reject the form submission | |
| */ | |
| add_filter('fluentform/validate_input_item_email', function ($error, $field, $formData) { | |
| if ($error || !defined('FLUENT_CRM')) { | |
| return $error; // already an error or FLUENTCRM is not activated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Code Snippet to support old affiliateWP Pretty links to FluentAffiliate | |
| * This will check if the URL contains /partner/{referral_code} and will convert it to ?ref={referral_code} | |
| * where 'ref' (or new variable) is the query variable that you had set in FluentAffiliate settings. | |
| */ | |
| add_action('wp', function () { | |
| if (!defined('FLUENT_AFFILIATE_DIR')) { | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Function: convert_number | |
| * | |
| * Description: | |
| * Converts a given integer (in range [0..1T-1], inclusive) into | |
| * alphabetical format ("one", "two", etc.) | |
| * | |
| * @int | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($){ | |
| if(typeof gtag != 'function') { | |
| return; | |
| } | |
| var fluentForms = $('form.frm-fluent-form'); | |
| fluentForms.each(function() { | |
| var $form = $(this); | |
| var formId = $form.attr('data-form_id'); | |
| gtag('event', 'ViewForm', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Internal Function for Fluent Forms Custom Slug | |
| * Do not EDIT this function | |
| */ | |
| function customFfLandingPageSlug($slug) | |
| { | |
| add_action('init', function () use ($slug) { | |
| add_rewrite_endpoint($slug, EP_ALL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Code snippet to make login form with Fluent Forms WordPress Plugins | |
| * Steps: | |
| * 1. make a form with email and password (Make sure the name attribute is 'email' and 'password' for corresponding field) | |
| * 2. Paste the shorcode in a page | |
| * 3. Change the form id in the bellow code (23) with your created fluentform's form id and paste in your theme's functions.php file | |
| * 4. That's it | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Function to prevent users mark more than expected items. | |
| * This code must need to be placed in custom JS of your form | |
| * @param: containerClass String - The contaner class of the target checkbox block. | |
| * You can add a custom container class in the form settings | |
| * | |
| * @param: maxChecked Integer - Max Number of items user can mark | |
| * @return: void | |
| * | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Add this js snippet in Form's JS box | |
| */ | |
| function capitalizeFLetter() { | |
| var $input = $form.find('.ff-name-field-wrapper').find('input'); | |
| $input.on('blur', function() { | |
| var string = $(this).val(); | |
| if(string) { | |
| string = string[0].toUpperCase() + string.slice(1); |
NewerOlder