### Usage Example Source: https://fluentforms.com/docs/fluentform_send_plain_html_email Implementation example to override the default email format behavior. ```php add_filter('fluentform/send_plain_html_email', function ($isSendAsPlain, $form, $notification) { return false; }, 10, 3); ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_email_template_header_image Implementation example to be placed in the functions.php file of an active theme. ```php add_filter('fluentform/email_template_header_image', function ($image, $form, notification) { // do your stuff if($image){ return $image; } return false; }, 10, 3); ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_email_template_email_heading Implementation example for customizing the email heading, to be placed in the functions.php file. ```php add_filter('fluentform/email_template_email_heading', function ($email_heading, $form, $notification) { // do your stuff if($email_heading){ return $email_heading; } return false; }, 10, 3); ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_post_selection_posts_pre_data Implementation example for the filter, intended for placement in the functions.php file. ```php add_filter('fluentform/post_selection_posts_pre_data', function ($posts, $data, $form) { // do your stuff return $posts; }, 10, 3); ``` -------------------------------- ### Hook into fluentform/starting_file_upload Source: https://fluentforms.com/docs/fluentform_starting_file_upload Example implementation to be added to the functions.php file of an active theme. ```php add_action('fluentform/starting_file_upload', function ($files, $form) { // Do your stuffs here }, 10, 2); ``` -------------------------------- ### Implementing the Action Hook Source: https://fluentforms.com/docs/before_fluentform_permission_set_assignment Example of how to register a callback function to the hook. ```php add_action('fluentform/before_permission_set_assignment', 'custom_function', 10, 0); function custom_function() { // Do your stuff here } ``` -------------------------------- ### Hook into fluentform/render_payment_entries Source: https://fluentforms.com/docs/flunetform_render_payment_entries Example implementation to be placed in the functions.php file of an active theme. ```php add_action('fluentform/render_payment_entries', function () { // Do your stuffs here }, 10, 0); ``` -------------------------------- ### Using fluentform/after_style_generated Source: https://fluentforms.com/docs/fluentform_after_style_generated Example implementation to be placed in the functions.php file of an active theme. ```php add_action('fluentform/after_style_generated', function ( $formId ) { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_rendering_field_html_elementname Example implementation to modify the HTML output of an email input field. Place this code in the functions.php file of your active theme. ```php add_filter('fluentform/rendering_field_html_input_email', function($html, $data, $form){ return $html; }, 10, 3); ``` -------------------------------- ### Hook into fluentform/scripts_registered Source: https://fluentforms.com/docs/fluentform_scripts_registered Example implementation to be placed in the functions.php file of an active theme. ```php add_action('fluentform/scripts_registered', function () { // Do your stuffs here }, 10, 0); ``` -------------------------------- ### Hook into fluentform/before_deleting_entries Source: https://fluentforms.com/docs/fluentform_before_entry_deleted Example implementation to be placed in the functions.php file of an active theme. ```php add_action('fluentform/before_deleting_entries', function ($entryId, $formId) { // Do your stuffs here }, 10, 2); ``` -------------------------------- ### Hook into fluentform/render_item_step_start Source: https://fluentforms.com/docs/fluentform_render_item_step_start Example implementation of the action hook to execute custom logic before a step renders. ```php add_action('fluentform/render_item_step_start', 'custom_function', 10, 2); function custom_function($startElement, $form) { // Do your stuff here } ``` -------------------------------- ### Example Custom Element Structure for getComponent() Source: https://fluentforms.com/docs/basefieldmanager-class An example of a custom element's structure, including its index, element key, attributes, settings, and editor options. This structure must be maintained when implementing the getComponent() method. ```php function getComponent() { return [ 'index' => 15, // The priority of your element 'element' => $this->key, // this is the unique identifier. 'attributes' => [ 'name' => $this->key, // initial name of the input field 'class' => '', // Custom element class holder 'value' => '', // Default Value holder 'type' => 'tel', // type of your element eg: text/number/email/tel 'placeholder' => __('Mobile Number', 'fluentformpro') // Default Placeholder ], 'settings' => [ 'container_class' => '', 'placeholder' => '', 'label' => $this->title, 'label_placement' => '', 'help_message' => '', 'admin_field_label' => '', 'validation_rules' => [ 'required' => [ 'value' => false, 'message' => __('This field is required', 'fluentformpro'), ], 'valid_phone_number' => [ 'value' => false, 'message' => __('Phone number is not valid', 'fluentformpro') ] ], 'conditional_logics' => [] ], 'editor_options' => [ 'title' => $this->title . ' Field', 'icon_class' => 'el-icon-phone-outline', // icon of the form in editor 'template' => 'inputText' // The template that will show in editor preview ], ]; } ``` -------------------------------- ### Configure Flatpickr Week Start Source: https://fluentforms.com/docs/time-date-input-field-in-fluent-forms Use this JSON configuration object to change the starting day of the week for the Date & Time picker. Setting firstDayOfWeek to 1 configures the week to start on Monday. ```json { "locale": { "firstDayOfWeek": 1 // start week on Monday } } ``` -------------------------------- ### Usage of fluentform/api_success_log Source: https://fluentforms.com/docs/fluentform_api_success_log Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/api_success_log', function($isDev, $form, $feed){ return $isDev; }, 10, 3); ``` -------------------------------- ### Usage of fluentform/editor_shortcodes Source: https://fluentforms.com/docs/fluentform_editor_shortcodes Example of how to hook into the filter and the structure of the shortcodes array. ```php add_filter('fluentform/editor_shortcodes', function($shortCodes){ return $shortCodes; }, 10, 1); ``` ```php [ 'title' => 'General SmartCodes', 'shortcodes' => [ '{wp.admin_email}' => __('Admin Email', 'fluentform'), '{wp.site_url}' => __('Site URL', 'fluentform'), '{wp.site_title}' => __('Site Title', 'fluentform'), '{ip}' => __('IP Address', 'fluentform'), '{date.m/d/Y}' => __('Date (mm/dd/yyyy)', 'fluentform'), '{date.d/m/Y}' => __('Date (dd/mm/yyyy)', 'fluentform'), '{embed_post.ID}' => __('Embedded Post/Page ID', 'fluentform'), '{embed_post.post_title}' => __('Embedded Post/Page Title', 'fluentform'), '{embed_post.permalink}' => __('Embedded URL', 'fluentform'), '{http_referer}' => __('HTTP Referer URL', 'fluentform'), '{user.ID}' => __('User ID', 'fluentform'), '{user.display_name}' => __('User Display Name', 'fluentform'), '{user.first_name}' => __('User First Name', 'fluentform'), '{user.last_name}' => __('User Last Name', 'fluentform'), '{user.user_email}' => __('User Email', 'fluentform'), '{user.user_login}' => __('User Username', 'fluentform'), '{browser.name}' => __('User Browser Client', 'fluentform'), '{browser.platform}' => __('User Operating System', 'fluentform'), '{random_string.your_prefix}' => __('Random String with Prefix', 'fluentform'), ], ]; ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_email_template_footer_text Implementation example for adding a custom filter to modify the email footer text in functions.php. ```php add_filter('fluentform/email_template_footer_text', function ($footerText, $form, notification) { // do your stuff return $footerText; }, 10, 3); ``` -------------------------------- ### Usage Example Source: https://fluentforms.com/docs/fluentform_email_content_type_header Example of how to hook into the filter to modify the email header in your theme's functions.php file. ```php add_filter('fluentform/email_content_type_header', function ($header) { // do your stuff return ''text/html; charset=UTF-8'; }, 10, 1); ``` -------------------------------- ### Hook into fluentform/init_custom_stylesheet Source: https://fluentforms.com/docs/fluentform_init_custom_stylesheet Example implementation to be placed in the functions.php file of an active theme to enqueue custom styles. ```php add_action('fluentform/init_custom_stylesheet', function ($selectedStyle, $formId) { // Do your stuffs here // enque style }, 10, 0); ``` -------------------------------- ### Hook into fluentform/is_handling_submission Source: https://fluentforms.com/docs/fluentform_is_handling_submission Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/is_handling_submission', function($status){ return $status; }, 10, 1); ``` -------------------------------- ### Implement fluentform/submission_notes filter Source: https://fluentforms.com/docs/fluentform_entry_notes Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/submission_notes', function($notes, $entry_id, $formId) { return $notes; }, 10, 3); ``` -------------------------------- ### Hook into fluentform/after_editor_start Source: https://fluentforms.com/docs/fluentform_after_editor_start Use add_action to execute custom logic when the editor starts. ```php add_action('fluentform/after_editor_start', 'custom_function', 10, 0); function custom_function() { // Do your stuff here } ``` -------------------------------- ### Implement fluentform/file_upload_params filter Source: https://fluentforms.com/docs/fluentform_file_upload_params Example implementation to be added to the functions.php file of the active theme. ```php add_filter('fluentform/file_upload_params', function ($param, $formData, $form) { // do your stuff return $param; }, 10, 3); ``` -------------------------------- ### Hooking into fluentform/load_form_assets Source: https://fluentforms.com/docs/fluentform_load_form_assets Example of how to attach a custom function to the hook in functions.php. ```php add_action('fluentform/load_form_assets', function ($formId) { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Implement generatePdf Method Source: https://fluentforms.com/docs/pdf-templatemanager-class Example implementation of the generatePdf method to fetch submission data and build the PDF body. ```php public function generatePdf($submissionId, $feed, $outPut = 'I', $fileName = '') { $submission = wpFluent()->table('fluentform_submissions') //submission data object ->where('id', $submissionId) ->first(); $htmlBody = '

My PDF body

'; // Html Body $footer = $submission->created_at; // footer $fileName = 'my-pdf-'.$submissionId; // filename return $this->pdfBuilder($fileName, $feed, $htmlBody, $footer, $outPut); } ``` -------------------------------- ### Implement Custom Shortcode Callback Source: https://fluentforms.com/docs/fluentform_shortcode_parser_callback_smart_code_name Example implementation to be added to functions.php to return dynamic data for a custom smartcode. ```php add_filter('fluentform/editor_shortcode_callback_my_own_smartcode', function ($value, $form) { $dynamicValue = $form->title; // We are send current form title. You can fetch any data and return return $dynamicValue; }, 10, 2); ``` -------------------------------- ### Hooking into the payment frameless action Source: https://fluentforms.com/docs/fluent_payment_frameless_paymentmethod Example implementation to be placed in the functions.php file of an active theme. ```php add_action('fluent_payment_frameless_'.$paymentMethod, function ($data) { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Register a custom add-on Source: https://fluentforms.com/docs/fluentform_global_addons Example of how to add a new module to the global add-ons list using the filter. ```php add_filter('fluentform/global_addons', function ($addons) use ($isEnabled) { $addons['zapier'] = [ 'title' => 'Title', 'category' => 'crm', 'description' => 'Description', 'logo' => '', 'enabled' => ($isEnabled) ? 'yes' : 'no' ]; return $addons; }); ``` -------------------------------- ### Implement fluentform/email_attachments filter Source: https://fluentforms.com/docs/fluentform_email_attachments Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/email_attachments', function ($emailAttachments, $emailData, $formData, $entry, $form) { // do your stuff return $emailAttachments; }, 10, 5); ``` -------------------------------- ### Usage of fluentform/all_entries Source: https://fluentforms.com/docs/fluentform_all_entries Example implementation for modifying submission data via the functions.php file. ```php add_filter('fluentform/all_entries', function($submissions) { return $submissions; }); ``` -------------------------------- ### Implementing a custom function for fluentform/before_form_render Source: https://fluentforms.com/docs/fluentform_before_form_render Example of how to hook into the action to execute custom logic before form rendering. ```php add_action('fluentform/before_form_render', 'your_custom_function', 10, 1); function your_custom_function( $form ) { // Do your stuffs here } ``` -------------------------------- ### Usage of fluentform/icontact_request_args Source: https://fluentforms.com/docs/fluentform_icontact_request_args Example implementation to modify request arguments, to be placed in the functions.php file of the active theme. ```php add_filter('fluentform/icontact_request_args', function ($options, $action, $method, $return_key) { // do your stuff return $options; }, 10, 4); ``` -------------------------------- ### Usage of fluentform/load_styles Source: https://fluentforms.com/docs/fluentform_load_styles Example implementation to override the default style loading behavior by returning true. ```php add_filter('fluentform/load_styles', function($status, $form){ return true; }, 10, 2); ``` -------------------------------- ### Usage of fluentform/post_selection_types Source: https://fluentforms.com/docs/fluentform_post_selection_types Example implementation for modifying post types, to be placed in the functions.php file of the active theme. ```php add_filter('fluentform/post_selection_types', function ($formattedTypes) { // do your stuff return $formattedTypes }, 10, 1); ``` -------------------------------- ### fluentform/starting_file_upload Source: https://fluentforms.com/docs/fluentform_starting_file_upload This action hook runs before a file upload process begins, allowing developers to intercept and modify the upload behavior. ```APIDOC ## fluentform/starting_file_upload ### Description This action hook runs before a file upload process begins. It allows developers to perform actions or modify data before the file is actually uploaded. ### Method Action Hook ### Endpoint N/A (WordPress Action Hook) ### Parameters #### Hook Parameters - **$files** (array) - Required - An array containing information about the files being uploaded. - **$form** (object) - Required - The form object associated with the upload. ### Usage ```php add_action('fluentform/starting_file_upload', function ($files, $form) { // Your custom code here to process files or form data before upload // For example, you could validate file types or sizes, or modify form data. }, 10, 2); ``` ### Source Code Location This hook is located in `_/fluentformpro/src/Uploader.php`. ``` -------------------------------- ### Fluent Forms Verify User Permission Filter Example Source: https://fluentforms.com/docs/fluentform_verify_user_permission_-eachpermission This is an example of how the fluentform/verify_user_permission_{$eachPermission} filter is applied. It verifies each permission and can be used to return false for specific permissions. ```php apply_filters('fluentform/verify_user_permission_' . $eachPermission, $allowed, $formId); ``` -------------------------------- ### Implementing the fluentform/post_integration_success hook Source: https://fluentforms.com/docs/fluentform_post_integration_success Example usage to be placed in the functions.php file of an active theme to perform tasks after post creation. ```php add_action('fluentform/post_integration_success', function ($postId, $postData, $entryId, $form, $feed) { // Do your stuffs here }, 10, 5); ``` -------------------------------- ### Hooking into fluentform/before_tools_wrapper Source: https://fluentforms.com/docs/fluentform_before_export_import_wrapper Example of how to add a callback function to the action. Place this code in the functions.php file of your active theme. ```php add_action('fluentform/before_tools_wrapper', function () { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Hooking into fluentform/after_permission_set_assignment Source: https://fluentforms.com/docs/after_fluentform_permission_set_assignment Example of how to attach a custom function to the action hook. ```php add_action('fluentform/after_permission_set_assignment', 'custom_function', 10, 0); function custom_function() { // Do your stuff here } ``` -------------------------------- ### Initializing Payment Method with init() Source: https://fluentforms.com/docs/basepaymentmethod-class The init() method sets up the necessary filters and actions for payment settings and processing. ```APIDOC ### init() This is the main function that will run all the required actions for this payment settings and processing. These hooks will be called dynamically during the payment processing & settings after the payment method setup is completed. ```php public function init() { add_filter('fluentform/payment_method_settings_validation_'.$this->key, array($this, 'validateSettings'), 10, 2); if(!$this->isEnabled()) { return; } add_filter('fluentform/transaction_data_' . $this->key, array($this, 'modifyTransaction'), 10, 1); add_filter( 'fluentform/available_payment_methods', [$this, 'pushPaymentMethodToForm'] ); } ``` ``` -------------------------------- ### Usage of fluentform/validation_errors Source: https://fluentforms.com/docs/fluentform_validation_errors Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/validation_errors', function($errors, $formData, $form, $fields){ return $errors; }, 10, 4); ``` -------------------------------- ### Usage of fluentform/is_form_renderable Source: https://fluentforms.com/docs/fluentform_is_form_renderable Example implementation to hook into the rendering process. Place this code in your theme's functions.php file. ```php add_filter('fluentform/is_form_renderable', function($isRenderable, $form){ return $isRenderable; }, 10, 2); ``` -------------------------------- ### Usage of fluentform/itl_options Source: https://fluentforms.com/docs/fluentform_itl_options Example implementation to hook into the filter and modify ITL options. ```php add_filter('fluentform/itl_options', function ($itlOptions, $data, $form) { // do your stuff return $itlOptions; }, 10, 3); ``` -------------------------------- ### IntegrationManager Class Initialization Source: https://fluentforms.com/docs/integrationmanager-class Documentation on how to extend the IntegrationManager class and initialize it via the constructor. ```APIDOC ## Class Initialization ### Description To create a custom integration, extend the `\FluentForm\App\Services\Integrations\IntegrationManager` class and override the `__construct` method. ### Parameters - **$application** (Application) - Required - The Fluent Forms Application instance. ### Request Example ```php use \FluentForm\App\Services\Integrations\IntegrationManager; use \FluentForm\Framework\Foundation\Application; public function __construct(Application $application) { parent::__construct( $application, 'MyAwesomeIntegration', // title 'myIntegrationKey', // integration key 'my_integration_details', // option key 'my_integration_feed', // settings key 11 // priority ); $this->description = ''; $this->logo = '/my-integration-image-file-path.png'; $this->registerAdminHooks(); } ``` ``` -------------------------------- ### Hook into Global Integration Settings Save for Automizy Source: https://fluentforms.com/docs/fluentform_save_global_integration_settings_-settingskey This example demonstrates how to hook into the 'save_global_integration_settings' action for the 'automizy' integration. The provided callback function will execute when these specific settings are saved. This code should be placed in your theme's functions.php file. ```php add_action('fluentform/save_global_integration_settings_automizy', function ($integration) { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Hook into fluentform/entry_lists_labels Source: https://fluentforms.com/docs/fluentform_global_form_vars Example implementation for modifying global variables via the filter. ```php add_filter('fluentform/entry_lists_labels', function($globalVars) { return $globalVars; }, 10, 1); ``` -------------------------------- ### Full TemplateManager Class Implementation Source: https://fluentforms.com/docs/pdf-templatemanager-class A complete example of a TemplateManager class including settings fields and PDF generation logic. ```php use FluentForm\Framework\Foundation\Application; class FluentExtraTemplateDemo extends \FluentFormPdf\Classes\Templates\TemplateManager { public function __construct(Application $app) { parent::__construct($app); } public function getDefaultSettings() { return [ 'header' => '

Hello From My Demo Template

', 'footer' => '

Footer

', 'body' => 'Hello There', ]; } public function getSettingsFields() { return array( [ 'key' => 'header', 'label' => 'Header Content', 'tips' => 'Write your header content which will be shown every page of the PDF', 'component' => 'wp-editor' ], [ 'key' => 'body', 'label' => 'PDF Body Content', 'tips' => 'Write your Body content for actual PDF body', 'component' => 'wp-editor' ], [ 'key' => 'footer', 'label' => 'Footer Content', 'tips' => 'Write your Footer content which will be shown every page of the PDF', 'component' => 'wp-editor' ], [ 'key' => 'demo', 'label' => 'Demp Input', 'tips' => 'Input Help Text', 'component' => 'text' ], ); } public function generatePdf($submissionId, $feed, $outPut = 'I', $fileName = '') { $submission = wpFluent()->table('fluentform_submissions') //submission data ->where('id', $submissionId) ->first(); $htmlBody = '

My PDF Body & other elements

'; // Html Body $footer = $submission->created_at; // footer $fileName = 'my-pdf-'.$submissionId; // filename return $this->pdfBuilder($fileName, $feed, $htmlBody, $footer, $outPut); } } ``` -------------------------------- ### Usage of fluentform/form_fields_update Source: https://fluentforms.com/docs/fluentform_form_fields_update Example implementation to hook into the filter within the functions.php file. ```php add_filter('fluentform/form_fields_update', function($formFields , $formId) { return $formFields; },10,2); ``` -------------------------------- ### Usage of fluentform/entry_lists_labels Source: https://fluentforms.com/docs/fluentform_entry_lists_labels Example implementation to hook into the filter and modify form labels. ```php add_filter('fluentform/entry_lists_labels', function($formLabels, $form) { return $formLabels; }, 10, 2); ``` -------------------------------- ### Usage of fluentform/store_submission_note Source: https://fluentforms.com/docs/fluentform_add_response_note Example implementation to hook into the filter and return the response note. ```php add_filter('fluentform/store_submission_note', function($response_note) { return $response_note; }, 10, 1); ``` -------------------------------- ### Usage of fluentform/disabled_analytics Source: https://fluentforms.com/docs/fluentform-disabled_analytics Example implementation to hook into the filter within the functions.php file. ```php add_filter('fluentform/disabled_analytics', function($status) { return $status; }, 10, 1); ``` -------------------------------- ### Usage of fluentform/html_attributes Source: https://fluentforms.com/docs/fluent_form_html_attributes Example of how to hook into the filter to modify form attributes globally. ```php add_filter('fluentform/html_attributes', function($attr, $form){ return $attr; }, 10, 2); ``` -------------------------------- ### Registering a callback for fluentform/form_element_start Source: https://fluentforms.com/docs/fluentform_form_element_start Use this pattern to hook into the form rendering process. Ensure the callback function accepts the form object as a parameter. ```php add_action('fluentform/form_element_start', 'custom_function', 10, 1); function custom_function() { // Do your stuff here } ``` -------------------------------- ### Implement fluentform/submission_message_parse filter Source: https://fluentforms.com/docs/fluentform_submission_message_parse Example implementation to be added to the functions.php file of an active theme. ```php add_filter('fluentform/submission_message_parse', function ($emailBody, $entryId, $submittedData, $form) { return $emailBody; }, 10, 4); ``` -------------------------------- ### Hooking into fluentform/form_application_view_entries Source: https://fluentforms.com/docs/ff_fluentform_form_application_view_route Example of how to attach a function to the entries route. Place this code in your theme's functions.php file. ```php add_action('fluentform/form_application_view_entries', function ( $form_id ) { // Do your stuffs here }, 10, 1); ``` -------------------------------- ### Hooking into fluentform/before_tools_container Source: https://fluentforms.com/docs/fluentform_before_export_import_container Use this snippet in your theme's functions.php file to execute custom logic before the tools container renders. ```php add_action('fluentform/before_tools_container', function () { // Do your stuffs here }, 10, 0); ``` -------------------------------- ### Implement Global Response Data Filter Source: https://fluentforms.com/docs/fluentform_insert_response_data Example of applying the filter to all forms globally. ```php add_filter('fluentform/insert_response_data', 'your_custom_response_data_filter_function', 10, 3); function your_custom_response_data_filter_function($formData, $formId, $inputConfigs) { // Your can alter the data here return $formData; } ``` -------------------------------- ### Abstract Methods for Global Settings Source: https://fluentforms.com/docs/basepaymentmethod-class These abstract methods must be implemented by any class extending BasePaymentMethod to handle global settings. ```APIDOC ## getGlobalFields() This method will return all the admin settings for the current payment method. You can add your own settings also here. At the end of this page, you will see an example with the settings format. ```php abstract public function getGlobalFields(); ``` ## getGlobalSettings() This method should return the saved data from the database. It will be based on the settings that were provided by **getGlobalFields()** method. You can get your settings like this **get_option(‘fluentform_payment_settings_{key}’, [])** ; ```php abstract public function getGlobalSettings(); ``` ``` -------------------------------- ### Nested Conditional Shortcode Implementation Source: https://fluentforms.com/docs/conditional-shortcodes-in-fluent-forms A practical example demonstrating how to display content based on multiple field conditions, such as checking a radio button selection and a rating value. ```shortcode [ff_if field="input_radio" is="equal" to="yes"] Glad to hear that you loved our product. [ff_sub_if field="ratings" is="greater_than" to="2"] Also, we want to Thank You for your valuable Ratings. [/ff_sub_if] [/ff_if] [ff_if field="input_radio" is="equal" to="no"] Thanks for using our product. We are working on improvement. [/ff_if] ``` -------------------------------- ### Retrieve Global Settings Source: https://fluentforms.com/docs/integrationmanager-class Fetches integration settings using an option key and merges them with default values. This method accepts a $settings parameter. ```php public function getGlobalSettings($settings) { $globalSettings = get_option($this->optionKey); if (!$globalSettings) { $globalSettings = []; } $defaults = [ 'apiKey' => '', 'status' => '' ]; return wp_parse_args($globalSettings, $defaults); } ``` -------------------------------- ### Implement fluentform/disable_attachment_delete filter Source: https://fluentforms.com/docs/fluentform_disable_attachment_delete Example implementation to hook into the filter and return the desired status. ```php add_filter('fluentform/disable_attachment_delete', function($status, $formId) { return $status; }, 10, 2); ``` -------------------------------- ### Usage of fluentform/available_date_formats Source: https://fluentforms.com/docs/fluentform-available_date_formats Example of how to hook into the filter to modify the available date formats array. ```php add_filter('fluentform/available_date_formats', function($formats){ return $formats; }, 10, 2); ``` -------------------------------- ### Hooking into fluentform/after_tools_wrapper Source: https://fluentforms.com/docs/fluentform_after_export_import_wrapper Example of how to add a callback function to the hook. Place this code in your theme's functions.php file. ```php add_action('fluentform/after_tools_wrapper', function () { // Do your stuffs here }, 10, 0); ``` -------------------------------- ### Hooking into flentform/form_duplicated Source: https://fluentforms.com/docs/flentform_form_duplicated Example implementation of a callback function to handle form duplication events. ```php add_action('flentform/form_duplicated', 'custom_function', 10, 1); function custom_function($newFormId) { // Do your stuff here } ```