This file contains 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 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 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); |
This file contains 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
// Simple JavaScript Templating | |
// John Resig - http://ejohn.org/ - MIT Licensed | |
// source http://ejohn.org/blog/javascript-micro-templating/ | |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? |
This file contains 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 | |
/* | |
* FluentCRM get contact count by tag ids | |
* Example Usage: fcrmGetContactCountByTagIds([1,2,4]); | |
* @param array $tagIds | |
* @return int | |
*/ | |
function fcrmGetContactCountByTagIds($tagIds = []) | |
{ |
This file contains 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 | |
/* | |
* Add Attachment to the email notification dynamically. | |
* @param $attachments array - Array of the attachments. | |
* @param $notification array - Email Notification array | |
* @param $form object - The Form Object | |
* @param $data array - The input submission data | |
* @return array | |
*/ |
This file contains 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 // do not include this line in FluentSnippets | |
add_action('woocommerce_order_list_table_restrict_manage_orders', function($type) { | |
if ( 'shop_order' !== $type ) { | |
return; | |
} | |
// get all payment methods, even inactive ones |
This file contains 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 | |
// The following Table Shortcode will show 5 rows per page | |
[ninja_tables id='YOUR TABLE ID HERE' per_page=5] | |
// The following Table Shortcode will not show search bar | |
[ninja_tables id='YOUR TABLE ID HERE' search=0] | |
// The following Table shorcode will disable table sorting | |
[ninja_tables id='YOUR TABLE ID HERE' sorting=0] |
This file contains 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 | |
* |
NewerOlder