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 != 180) { // 180 is your form id. Change the 23 with your own login for ID | |
return; | |
} | |
$redirectUrl = home_url().'/library/shelves/'; // 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_validate_input_item_phone', function($errorMessage, $field, $formData, $fields, $form) { | |
$target_form_id = 302; | |
if($form->id != $target_form_id ) { | |
return $errorMessage ; | |
} | |
var_dump($fromData->form_fields); | |
if( $formData['phone'] != $formData['phone_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_action('fluentform/before_insert_submission', function ($insertData, $data, $form) { | |
if($form->id != 17) { // 17 is your form id. Change the 17 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
var from = "from"; //change the name attribute of the from date field | |
var to = "to"; //change the name attribute of the to date field | |
var showHere = "showHere"; //change the name attribute of show difference field | |
var daysText = "days"; | |
let fp = flatpickr("#ff_225_from", {}); //change form id with yours | |
let fp2 = flatpickr("#ff_225_to", {}); //change form id with yours |
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 rangeSlider = document.querySelector("#ff_258_rangeslider"); | |
let rangeValue = document.querySelector(".ff_range_value"); | |
rangeSlider.onchange = function(event){ | |
let commaValue = event.target.value.replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
rangeValue.innerText = "$ "+commaValue; | |
} |
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 != 229) { // 229 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
(function(){ | |
let sliderValue = document.querySelector('.ff_range_value'); | |
var number = 0; | |
sliderValue.insertAdjacentHTML('afterend', `<span class=range_calc style='display: block; width: 100%; text-align: center; font-size: 32px; font-weight: 600;'>$0</span>`); | |
document.querySelector('.range_calc').insertAdjacentHTML('afterend', "<span class='text' style='display: block; width: 100%; text-align: center; font-size: 32px; font-weight: 600;'> Potential Earnings </span>"); | |
number = document.querySelector('.ff_range_value').innerText.split('$'); | |
number = number[0]*15; | |
document.querySelector('.range_calc').innerText =`$${number}`; |
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 emailFieldOne = document.getElementById('ff_156_email'); | |
let emailFieldTwo = document.getElementById('ff_156_email_1'); | |
let submitButton = document.querySelector('.ff-btn-submit'); | |
submitButton.style.display = 'none'; | |
emailFieldTwo.insertAdjacentHTML('afterend', '<div id="customDiv" style="text-align:center; display:none; color:red;"></div>'); | |
let displayed = false; | |
let customDiv = document.getElementById('customDiv'); |
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_input_email', function($errorMessage, $field, $formData, $fields, $form) { | |
$target_form_id = 8; | |
if($form->id != $target_form_id ) { | |
return $errorMessage ; | |
} | |
if( $formData['email'] != $formData['email_1'] ){ | |
$errorMessage= ['Error! Email does not match']; |
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_insert_response_data', 'your_custom_response_data_filter_function', 10, 3); | |
function your_custom_response_data_filter_function($formData, $formId, $inputConfigs) | |
{ | |
if($formId != 151) { | |
return $formData; | |
} | |
$formData['email'] = '[email protected]'; |