Skip to content

Instantly share code, notes, and snippets.

View ahsanchowdhury's full-sized avatar

Ahsan Chowdhury Nayem ahsanchowdhury

View GitHub Profile
add_filter('fluentform_numeric_styles', function($format){
$newFormat['dot_comma_style_zero_witout_comma_and_decimal'] = array(
'value' => 'dot_comma_style_zero_witout_comma_and_decimal',
'label' => __('US Style without Comma Decimal & Comma Separator (Ex: 123 456 789)', 'fluentform'),
'settings' => [
'decimal' => '.',
'separator' => '',
'precision' => 5,
'symbol' => ''
]
add_action('fluentform_before_insert_submission', function ($insertData, $data, $form) {
if($form->id != 123) { // 123 is your form id. Change the 123 with your own login for ID
return;
}
$redirectUrl = home_url(); // You can change the redirect url after successful login
// if you have a field as refer_url as hidden field and value is: {http_referer} then
// We can use that as a redirect URL. We will redirect if it's the same domain