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('fluentform_predefined_forms', function ($demoForms) { | |
$demoForms['nicolas_form_1'] = array( | |
'screenshot' => '', // You may add your form screenshot here | |
'createable' => true, | |
'title' => 'Form 1 by Nicolas', | |
'tag' => ["nicolas form"], |
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 | |
/* | |
* If you want to return raw provided url without any sanitization and security check then you can use this snippet. | |
*/ | |
add_filter('fluentform_submission_confirmation', function ($returnData, $form, $confirmation) { | |
if(empty($returnData['redirectUrl'])) { | |
return $returnData; | |
} |
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 | |
// Inject Link Form Settings Menu | |
add_filter('fluentform_form_settings_menu', function ($items) { | |
$items['my_menu_slug'] = [ | |
'title' => 'My Menu Title', | |
'slug' => 'my_settings_slug' | |
]; | |
return $items; |
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 Browser Language smartcode on Fluent Forms Editor | |
*/ | |
add_filter('fluentform_editor_shortcodes', function ($groups) { | |
$groups[0]['shortcodes']['{browser_lang}'] = 'Browser Language'; | |
return $groups; | |
}); | |
add_filter('fluentform_editor_shortcode_callback_browser_lang', function ($val) { |
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('fluentform_editor_vars', function($vars) { | |
$bulkOptionsJson = $vars['bulk_options_json']; | |
$arrays = json_decode($bulkOptionsJson, true); | |
$arrays['New Option Group'] = ['Option 1', 'Option 2']; | |
$vars['bulk_options_json'] = json_encode($arrays); | |
return $vars; | |
}); |
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
// required css | |
<style> | |
span.ff_submitting { | |
display: none; | |
} | |
.ff-working span.ff_submitting { | |
display: block; | |
} |
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
// required css | |
<style> | |
span.ff_submitting { | |
display: none; | |
} | |
.ff-working span.ff_submitting { | |
display: block; | |
} |
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 myFluentCrmTagIdBySlug($slug) { | |
$tag = \FluentCrm\App\Models\Tag::where('slug', $slug)->first(); | |
if($tag) { | |
$tagId = $tag->id; | |
} | |
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_action('fluentcrm_confirmation_head', function ($subscriber) { | |
$redirectUrl = 'https://google.com'; // Change this url; | |
echo '<meta http-equiv="refresh" content="0; URL='.$redirectUrl.'" />'; | |
}); |
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 to push a task for background processing | |
* @param: string $callbackName - Your classback acction name | |
* @param: mixed $payload - Your payload data that you will get when procssing on callback | |
*/ | |
function my_custom_queue_on_background($callbackName, $payload) | |
{ |