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
/* | |
* Unique email vaildation | |
*/ | |
add_action('fluentform_before_insert_submission', function ( $insertData, $data, $formId ) { | |
if($formId->id != 100) { // You can pass your form id here | |
return; | |
} |
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
// 1. Add input text elemet to show the difference | |
// 2. add 'time-1' & 'time-2' class to the to time input field | |
// 3. paste the following code in fluent form custom JS | |
// time format HH:MM | |
var show_input_selector = '.hour'; | |
var time1 = jQuery('.time-1'); | |
var time2 = jQuery('.time-2'); | |
const convertTime12to24 = (time12h) => { |
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
//app\Services\FormBuilder\Notifications\EmailNotification.php | |
$emailBody = apply_filters('fluentform_email_body', $emailBody, $notification, $submittedData, $form); | |
$subject = apply_filters('fluentform_email_subject', $notification['subject'], $notification, $submittedData, $form); | |
$emailTo = apply_filters('fluentform_email_to', $notification['sendTo']['email'], $notification, $submittedData, $form); | |
return wp_mail( | |
$emailTo, | |
$subject, | |
$emailBody, | |
$headers, |
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_filter('fluenform_rendering_field_data_select', function ($data, $form) { | |
if ($form->id != 91) { | |
return $data; | |
} | |
// do the dynamic part if and only the name attriibute is 'dynamic_dropdown' | |
// Please use the corresponding field name for your case. | |
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'dynamic_dropdown') { | |
return $data; |
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
/* PAYMENT */ | |
// Executes when payment is failed | |
do_action('wppayform/form_payment_failed', $submission, $transaction, $form, $charge, $type); | |
// Executes when stripe payment is failed | |
do_action('wppayform/form_payment_stripe_failed', $submission, $transaction, $form, $charge, $type); | |
// Executes when paypal payment is processing |
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_action('fluenform_before_submission_confirmation', function($entryId, $formData, $form) | |
{ | |
if($form->id != 11){ // change form ID | |
return; | |
} | |
$email = $formData['email']; // fetch all your data , appened to the URL using & sign | |
wp_send_json_success([ | |
'result' => [ | |
'redirectUrl' => 'https://google.com/?email='.$email, |
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 | |
function distance($lat1, $lng1, $lat2, $lng2) | |
{ | |
// convert latitude/longitude degrees for both coordinates | |
// to radians: radian = degree * π / 180 | |
$lat1 = deg2rad($lat1); | |
$lng1 = deg2rad($lng1); | |
$lat2 = deg2rad($lat2); | |
$lng2 = deg2rad($lng2); |
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_filter('fluenform_rendering_field_data_select', function ($data, $form) { | |
$target_formId= 91; // form ID | |
$post_type= 'books'; //your post type | |
if ($form->id != $target_formId) { | |
// return $data; | |
} | |
// check if the name attriibute is 'job_list' | |
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'job_list') { |
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
//1. Make sure to enter form ID isntead of 20 | |
//2. match your address field name attribute is same as address_1 | |
//3. Add your own error message | |
add_action('fluentform_before_insert_submission', function ($insertData, $data, $form){ | |
$target_formId = 14; | |
$blacklist_string = 'CO4 6BP,CM4 6BP'; | |
$msg = "Sorry! Your error message !"; |
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
let minus; | |
jQuery('body').on('click','.js-repeat-buttons',function(){ | |
calculate(); | |
}) | |
function calculate(){ | |
let length = jQuery('.calculate .ff_repeater_table tbody tr').length | |
let sum = 0; | |
OlderNewer