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_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
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
{ | |
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
// 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
add_filter('fluentform_entry_statuses_core', function ($statuses) { | |
$statuses['important'] = 'Important'; | |
return $statuses; | |
}, 10, 1); |
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 = 2; | |
//google sheet shared as CSV link | |
$csvUrl = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vSQM0ay3KgEmTp64M7ZZ5n5QXHDsSzaaJcVCuIHBvgMIw32foNpdfd4jNnUMua8b5Mavb6E4jox_nic/pub?output=csv'; | |
$columName = 'Opex Vessel Categories'; // 'Players' is the column name | |
$uniqueData = false; // 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
add_action('fluentform_before_submission_confirmation', 'your_custom_confirmation_function', 20, 3); | |
function your_custom_confirmation_function($entryId, $formData, $form) | |
{ | |
if ($form->id != 207) { | |
return; | |
} | |
sleep(20); | |
// DO your stuff 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
function add_login_check() | |
{ | |
if (is_user_logged_in()) { | |
if (is_page(200)){ | |
wp_redirect('https://dev-mahdii.pantheonsite.io/'); | |
exit; | |
} | |
} | |
} |
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 add_login_check() | |
{ | |
if (is_user_logged_in()) { | |
if (is_page(200)){ | |
wp_redirect('https://dev-mahdii.pantheonsite.io/'); | |
exit; | |
} | |
} | |
} |