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('fluentform_rendering_field_data_input_radio', function ($data, $form) { | |
//change form id | |
if ($form->id != 91) { | |
return $data; | |
} | |
//add your get param key | |
$key = 'my_get'; | |
if(isset($_GET[$key])){ | |
$data['attributes']['value'] = sanitize_text_field($_GET[$key]); |
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('fluentform_file_type_options', function ($types) { | |
$types[] = [ | |
'label' => __('3d files - DWG, STL, STEP, STP, SKP, MAX, FBX, 3DS, IGES, OBJ', 'fluentform'), | |
'value' => 'dwg|stp|stl|STEP|skp|max|fbx|3ds|iges|obj', | |
]; | |
return $types; | |
}); | |
add_filter('upload_mimes', function ($mime_types) { | |
$mime_types ['dwg'] = 'image/vnd.dwg'; |
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
// booking date check in > check out | |
// add the two class 'in-date' & 'out-date' | |
$( document ).ready(function() { | |
var check_in = flatpickr(".in-date",{dateFormat: "d/m/Y",}); | |
var check_out = flatpickr(".out-date",{dateFormat: "d/m/Y",}); | |
check_in.element.addEventListener("change", function(){ |
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_input_radio', function ($data, $form) { | |
if ($form->id != 91) { | |
return $data; | |
} | |
// check if the name attriibute is 'checkbox', make sure it mathc | |
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'checkbox') { | |
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
<?php | |
//form | |
do_action('fluentform_loaded'); | |
//do_action('fluentform_before_insert_submission', $insertData, $data, $this->form); | |
do_action('fluentform_before_form_actions_processing', $insertId, $this->formData, $this->form); | |
//do_action('fluenform_before_submission_confirmation', $insertId, $formData, $form); | |
//do_action('fluentform_submission_inserted', $insertId, $formData, $form); | |
//payment |
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('fluentform_form_submission_confirmation', function($confirmation,$formData,$form){ | |
$targer_form_id = 11; | |
if($form->id!= $targer_form_id) { | |
return ; | |
} | |
$set_1 = ['ABCD','AAAA']; | |
$set_2 = ['ABAB','BBBB']; | |
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
/** | |
* Function to prevent users mark more than expected items. | |
* This code must need to be placed in custom JS of your form | |
* @param: containerClass String - The contaner class of the target checkbox block. | |
* You can add a custom container class in the form settings | |
* | |
* @param: maxChecked Integer - Max Number of items user can mark | |
* @return: void | |
* | |
*/ |
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('recaptcha_custom_function', 'recaptcha_custom_function_callback', 10, 1 ); | |
function recaptcha_custom_function_callback( $form) { | |
echo ' | |
<script type="text/javascript"> | |
jQuery( document ).ready(function() { | |
jQuery(".ff-btn-submit").attr("disabled", "true"); | |
}); | |
function enableBtn(){ | |
jQuery(".ff-btn-submit").removeAttr("disabled"); | |
} |
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('fluentform_filter_email_attachments', function($emailAttachments, $notification,$form, $entry){ | |
$target_form_id = 29; | |
if($form->id != $target_form_id){ | |
return; | |
} | |
$media_id = 144; | |
$emailAttachments[] = get_attached_file($media_id); | |
//or pass the exact file location like this |
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
// booking date check in > check out | |
$( document ).ready(function() { | |
var check_in = flatpickr(".in-date",{dateFormat: "d/m/Y",}); | |
var check_out = flatpickr(".out-date",{dateFormat: "d/m/Y",}); | |
check_in.element.addEventListener("change", function(){ | |
check_out.set( "minDate" , check_in.element.value ); | |
}); |
NewerOlder