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 extra settings to flatpickr calendar | |
function bleye_ff_custom_calendar_settings( $config, $settings, $form ) { | |
$start_of_week = get_option('start_of_week'); // get the option from the WP settings | |
$config['locale'] = ['firstDayOfWeek' => $start_of_week]; // add the config to flatpickr | |
return $config; | |
} | |
add_filter('fluentform/frontend_date_format', 'bleye_ff_custom_calendar_settings', 10, 3); |
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 birthDate = selectedDate[0] ; | |
birthDate.setDate(birthDate.getDate() +1); | |
var today = new Date(); | |
var age = today.getTime() - birthDate.getTime(); | |
var inYears = age/(1000*60*60*24*365); |
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
let calculatedValue = document.getElementById('ff_495_numeric-field_2'); | |
let subscriptionValue = document.getElementById('payment_input_1_custom_0'); | |
subscriptionValue.disabled = true; | |
calculatedValue.onchange = function(){ | |
subscriptionValue.value = calculatedValue.value; | |
jQuery('#payment_input_1_custom_0').trigger('change'); |
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, $form) { | |
if($form->id != 557) { // 557 is your form id. Change the 229 with your own login for ID | |
return; | |
} | |
$redirectUrl = home_url(); // You can change the redirect url after successful login | |
if (get_current_user_id()) { // user already registered | |
wp_send_json_success([ | |
'result' => [ |
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_filter('fluentform_global_form_vars', function ($arr) { | |
$target_form_id = 170; | |
$arr['choice_js_vars']['itemSelectText'] = 'drücken, um auszuwählen'; | |
return $arr; | |
}); |
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_filter('fluentform_validate_input_item_select', function ($errorMessage, $field, $formData, $fields, $form) { | |
$fieldName = 'dropdown'; //name attribute of the dropdown field | |
$target_form_id = 597; //change the form id | |
if($target_form_id != $form->id){ return $errorMessage; } | |
if ($inputValue = \FluentForm\Framework\Helpers\ArrayHelper::get($formData, $fieldName)) { |
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', 'validate_email_reoon', 10, 3); | |
function validate_email_reoon($insertData, $data, $form) | |
{ | |
if($form->id != 633) { //change the form id with your form id | |
return; | |
} | |
$apiKey = 'lYlSwj3Uxt5iGecFTHYdqKC4xBQYaClf'; //put your api key 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_filter('fluent_crm/theme_pref', 'changeColorPalette', 10, 1); | |
function changeColorPalette(){ | |
$color_palette = [ | |
[ | |
"name" => __("MyBlue", "fluent-crm"), | |
"slug" => "myblue", | |
"color" => "#336699" | |
], |
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_filter('fluentform_rendering_field_data_select', function ($data, $form) { | |
$targetFormID = 15; | |
//google sheet shared as CSV link | |
$csvUrl = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vT-mQ_isy2CXOi70SjjbNaCPbmhmshikUS8o3nEthE2N-6NsqdABnW6Crlmb2DegaO6IsM9QcjlWPz4/pub?output=csv'; | |
$columName = 'Processos ativos'; // 'Players' is the column name | |
$uniqueData = true; // remove duplicate values | |
if ($form->id != $targetFormID) { |
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
let rangeSliderOne = document.querySelector("#ff_798_rangeslider"); | |
let rangeSliderTwo = document.querySelector("#ff_798_rangeslider_1"); | |
let rangeSliderThree = document.querySelector("#ff_798_rangeslider_2"); | |
let rangeValues = document.querySelectorAll(".ff_range_value"); | |
rangeSliderOne.onchange = function(event){ | |
let commaValue = event.target.value.replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |