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 to the HTML field on your form editor | |
<link rel="stylesheet" href="//cdn.addpipe.com/2.0/pipe.css"> | |
<div id="fluentformVdoRecoder"> </div> | |
<script type="text/javascript" src="//cdn.addpipe.com/2.0/pipe.js"></script> | |
// Paste this script bellow on your custom JSS field and replace the "ACCOUNT_HASH_ID". | |
// Ensure that the form have at least one hidden field | |
var hash = "Your Account Hash"; | |
var fieldName = 'hidden'; |
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
// Change Month names | |
var tarns = { | |
Jan : 'text for January', // change text here | |
Feb : 'text for February', | |
Mar : 'text', | |
Apr : 'text', | |
May : 'text', | |
Jun : 'text', | |
Jul : 'text', | |
Aug : 'text', |
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
var a = jQuery(".ninja_filter_date_picker,.ninja_filter_date_range"); | |
jQuery.each(a, function (t, e) { | |
var n = jQuery(e); | |
n.pikaday({ | |
format: n.data("date_format"), | |
defaultDate: n.val(), | |
i18n: { | |
previousMonth : 'SPrevious Month', //Change Previous Month text here | |
nextMonth : 'SNext Month', //Change Next Month text here | |
months : ['SJanuary','February','March','April','May','June','July','August','September','October','November','December'], //Change Month (Fullname) text here |
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_action('fluentform_before_insert_submission', function ( $insertData, $data, $formId ) { | |
if($formId->id != 52) { // You can pass your form id here | |
return; | |
} | |
// Email based check | |
$isExist = wpFluent()->table('users') | |
->where('user_email', $data['email']) | |
->first(); |
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
//Restrict repeated submission by user per day based on IP | |
add_action('fluentform_before_insert_submission', function ( $insertData, $data, $formId ) { | |
if($formId != 6) { // You can pass your form id here | |
return; | |
} | |
// IP based check | |
$last24Hours = date('Y-m-d H:i:s', time() - 24 * 60 * 60); | |
$isExist = wpFluent()->table('fluentform_submissions') |
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
/* | |
* The following functions will add additional file types option to your file upload element | |
* In this case, You can enable psd/ai/eps file format | |
* Just add this snippet to your theme's functions.php file or relevant place. | |
*/ | |
add_filter('fluentform_file_type_options', function ($types) { | |
$types[] = [ | |
'label' => __('Graphics Files (psd, ai, eps)', 'fluentform'), | |
'value' => 'psd|ai|eps|bin', |
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 | |
/* | |
* 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 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
$( document ).ready(function() { | |
var placeholder = 'result'; // Give your result fields class name | |
var date_one = 'start_date'; // Give your Start Day fields class name | |
var date_two = 'end_date'; // Give your End Day fields class name | |
var format = 'mm.dd.yyyy'; // Give your Date Format (use mm for m, dd for d and yyyy for y) | |
var seperator = "." // Give your date seperator here | |
var date = format.split(seperator); | |
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
{ | |
onChange: function(selectedDate, dateString) { | |
var date = selectedDate[0] ; | |
date.setDate(date.getDate() + 1); | |
flatpickr('.endingDate', { | |
"minDate": date, | |
dateFormat: "d/m/Y", | |
}); | |
} | |
} |
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
/* | |
* Custom Editor SmartCode | |
* {my_http_refer} | |
*/ | |
add_filter('fluentform_editor_shortcode_callback_my_http_refer', function ($val) { | |
return 'My Value'; | |
}); |