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('ninja_table_raw_sql_placeholders', function ($value) { | |
$value['{name}'] = 'kamrul'; | |
return $value; | |
}); |
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 != 8) { // 23 is your form id. Change the 23 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_rendering_field_data_address', function ($data,$form) | |
{ | |
// your form id | |
if($form->id != 1) { | |
return $data; | |
} | |
// the base adress field name | |
$addressField = 'address_1'; | |
if( $data['attributes']['name'] != $addressField ){ |
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
/* | |
* The following functions will add additional file types option to your file upload element | |
* In this case, You can enable .dwg file format | |
* Just add this snippet to your theme's functions.php file or relevant place. | |
*/ | |
add_filter('fluentform_file_type_options', function ($types) { | |
$types[] = [ | |
'label' => __('Autocad Files (dwg)', 'fluentform'), | |
'value' => 'dwg', |
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('ninja_table_rendering_table_vars',function($table_vars, $table_id, $tableArray){ | |
$target_id = 5; | |
if($tableArray['table_id'] != $target_id) { return $table_vars; } | |
$counter_column = [ | |
'name' => 'serial', | |
'key' => 'serial', | |
'title' => 'Serial', | |
]; | |
array_unshift($table_vars['columns'], $counter_column); |
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
<?php | |
/* | |
1. Add this in theme function.php or any PHP snippet plugin | |
2. Add your own status in the array | |
*/ | |
add_filter('fluentform_entry_statuses',function($data){ | |
$new_stat = [ | |
'checking'=> 'Checking', | |
'complete'=>'Completed' |
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
<?php | |
/* | |
Plugin Name: Fluent Form User Email Verification | |
Description: Fluent Form User Email Verification | |
Version: 1.0 | |
Author: WPManageNinja Support Team | |
Author URI: https://wpmanageninja.com | |
Plugin URI: https://wpmanageninja.com | |
License: GPLv2 or later | |
Text Domain: fluentform |
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('fluenform_rendering_field_data_select', function ($data, $form) { | |
if ($form->id != 3) { | |
return $data; | |
} | |
// check if the name attriibute is 'dropdown' , it is by default dropdown for the first dropdown input | |
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'dropdown') { | |
return $data; |
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
<?php | |
/* | |
* Say we want to change data of table id 1477 then you can write the following | |
* code. | |
* $data is the array of frontend data | |
*/ | |
add_filter('ninja_tables_get_public_data', function ($data, $tableId) { | |
if ($tableId == 1477) { | |
$data[] = [ | |
'name' => 'Dynaic Name', |
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_form_render', 'ff_single_entry_per_user', 10, 1); | |
function ff_single_entry_per_user( $form ) | |
{ | |
$target_form_id = 1; | |
$message = "Submission Done! Thanks."; | |
$hideForm = true; | |
if($form->id !=$target_form_id ){ | |
return; |