Skip to content
Get Discount
Formidable Forms alternatives
  • Pricing
  • Features
  • Templates
  • Integrations
  • Blog
  • Docs
  • Account
Sign in

Get Discount
Formidable Forms alternatives
Popular Search submitsubmissionentryentriespayment

Developer Docs

  • Database Tables of Fluent Forms
  • Submission Lifecycle
  • Integration Feed – Fields API
  • Creating Custom SmartCode for Form Editor
  • Limit Email Domains in Fluent Forms Form Submission
  • Email verification with Emailable
  • Email Confirmation Field
  • How to make a login form with Fluent Form
  • How to make a strong password requirement in user registration forms with Fluent Forms
  • Create Unique Fields in Fluent Forms
  • Populate dropdown field options from Google Sheet
  • Form PHP API
  • PHP Action Hooks
  • PHP Filter Hooks
  • Useful Snippets
  • Creating Pretty Conversational Form URL Slug
  • How to create your own custom field with Fluent Forms

Action Hooks

  • fluentform/before_insert_submission
  • fluentform/submission_inserted
  • fluentform/before_submission_confirmation
  • fluentform/inserted_new_form
  • fluentform/before_form_render
  • fluentform/loaded
  • fluentform/before_form_actions_processing
  • fluentform/before_insert_payment_form
  • flentform/form_duplicated
  • fluentform/form_imported
  • fluentform/after_save_form_settings
  • fluentform/editor_init
  • fluentform/loading_editor_assets
  • fluentform/before_editor_start
  • fluentform/after_editor_start
  • fluentform/after_form_screen_wrapper
  • fluentform/before_form_screen_wrapper
  • fluentform/render_item_{$item}
  • fluentform/after_form_render
  • fluentform/form_element_start
  • fluentform/render_item_step_start
  • fluentform/render_item_step_end
  • fluentform/rendering_calculation_form
  • fluentform/maybe_scheduled_jobs
  • fluentform/do_email_report_scheduled_tasks
  • fluentform/before_permission_set_assignment
  • fluentform/after_permission_set_assignment
  • fluentform/global_menu
  • fluentform/after_form_navigation
  • fluentform/form_application_view_{$route}
  • fluentform/init_custom_stylesheet
  • fluentform/load_form_assets
  • fluentform/scripts_registered
  • fluentform/render_payment_entries
  • fluentform/pre_load_scripts
  • fluentform/submission_note_stored
  • fluentform/starting_file_upload
  • fluentform/global_notify_completed
  • fluentform/save_global_integration_settings_{ $settingsKey}
  • fluentform/integration_action_result
  • fluentform/email_summary_details
  • fluentform/email_template_after_footer
  • fluentform/addons_page_render_{$current_menu_item}
  • fluentform/before_form_settings_app
  • fluentform/after_form_settings_app
  • fluentform/form_settings_container_{$current_sub_route}
  • fluentform/before_global_settings_wrapper
  • fluentform/after_global_settings_wrapper
  • fluentform/global_settings_component_{$currentComponent}
  • fluentform/after_global_settings_option_render
  • fluentform/before_global_settings_option_render
  • fluentform/before_tools_wrapper
  • fluentform/after_tools_wrapper
  • fluentform/before_tools_container
  • fluentform/after_tools_container
  • fluentform/form_styler
  • fluentform/after_style_generated
  • fluentform/conversational_frame_head
  • fluentform/conversational_frame_footer
  • fluentform/user_registration_before_start
  • fluentform/created_user
  • fluentform/user_registration_completed
  • fluentform/post_integration_success
  • fluentform/entry_confirmation
  • fluentform/before_partial_entry_deleted
  • fluentform/after_partial_entry_deleted
  • flunetform/render_payment_entries
  • fluentform/before_all_entries_render
  • fluentform/after_all_entries_render
  • fluentform/before_deleting_entries
  • fluentform/after_deleting_entries
  • fluentform/payment_receipt_before_content
  • fluentform/payment_receipt_after_content
  • fluentform/payment_frameless_{$paymentMethod}
  • fluentform/rending_payment_method_{$methodName}
  • fluentform/payment_method_render_{$methodName}
  • fluentform/before_payment_status_change
  • fluentform/after_payment_status_change
  • fluentform/payment_refunded_{$method}
  • fluentform/payment_refunded
  • fluentform/payment_refund_updated_{$method}
  • fluentform/payment_refund_updated
  • fluentform/ipn_paypal_action_{$txn_type}
  • fluentform/ipn_endpoint_{$paymentMethod}
  • fluentform/ipn_paypal_action_web_accept

Filter Hooks

  • fluentform/insert_response_data
  • fluentform/filter_insert_data
  • fluentform/submission_confirmation
  • fluentform/validate_input_item_{input_key}
  • fluentform/entry_statuses_core
  • fluentform/rendering_field_data_{INPUT_KEY}
  • fluentform/email_body
  • fluentform/rendering_field_data_select
  • fluentform/filter_email_attachments
  • fluentform/rendering_form
  • fluentform/is_form_renderable
  • fluentform/is_handling_submission
  • fluentform/validation_errors
  • fluentform/honeypot_name
  • fluentform/before_render_item
  • fluentform/rendering_field_html_{$elementName}
  • fluentform/skip_no_conflict
  • fluentform/load_styles
  • fluentform/load_default_public
  • fluentform/is_hide_submit_btn_{ $formId}
  • fluentform/form_class
  • fluentform/html_attributes
  • fluentform/editor_shortcodes
  • fluentform/shortcode_parser_callback_{smart_code_name}
  • fluentform/all_editor_shortcodes
  • fluentform/smartcode_group_{$group}
  • fluentform/payment_smartcode
  • fluentform/entry_statuses_core
  • fluentform/nonce_verify
  • fluentform/nonce_error
  • fluentform/numeric_styles
  • fluentform/akismet_fields
  • fluentform/will_return_html
  • fluentform/honeypot_status
  • fluentform/dashboard_notices
  • fluentform/is_admin_page
  • fluentform/single_response_data
  • fluentform/available_date_formats
  • fluentform/permission_set
  • fluentform/api_all_logs
  • fluentform/api_success_log
  • fluentform/api_failed_log
  • fluentform/truncate_password_values
  • fluentform/verify_user_permission_{ $eachPermission}
  • fluentform/permission_callback
  • fluentform/nonce_error
  • fluentform/editor_init_element_{$element}
  • fluentform/editor_validation_rule_settings
  • fluentform/editor_element_settings_placement
  • fluentform/editor_components
  • fluentform/editor_countries
  • fluentform/editor_element_customization_settings
  • fluentform/addons_extra_menu
  • fluentform/global_addons
  • fluentform/global_integration_settings_{$settingsKey}
  • fluentform/global_integration_fields_{$settingsKey}
  • fluentform/global_notification_active_types
  • fluentform/notifying_async_{$integrationKey}
  • fluentform/mailchimp_keep_existing_interests
  • fluentform/mailchimp_keep_existing_tags
  • fluentform/global_notification_feed_{$meta_key}
  • fluentform/integration_data_{$integrationKey}
  • fluentform/shortcode_defaults
  • fluentform/info_shortcode_defaults
  • fluentform/get_raw_responses
  • fluentform/export_data
  • fluentform/shortcode_feed_text
  • fluentform/entry_lists_labels
  • fluentform/all_entries
  • fluentform/step_string
  • fluentform/global_form_vars
  • fluentform/all_entry_labels
  • fluentform/all_entry_labels_with_payment
  • fluentforms/recaptcha_v3_ref_score
  • fluentform/auto_read
  • fluentform/create_default_settings
  • fluentform/form_fields_update
  • fluentform/submissions_widgets
  • fluentform/disabled_analytics
  • fluentform/submission_notes
  • fluentform/store_submission_note
  • fluentform/disable_attachment_delete
  • fluentform/response_render_{element}
  • fluentform/settings_module_{$module}
  • fluentform/rendering_field_html_{$element}
  • fluentform/validation_message_{$ruleName}
  • fluentform/item_rules_{$item}
  • fluentform/send_plain_html_email
  • fluentform/submission_message_parse
  • fluentform/email_subject
  • fluentform/email_body
  • fluentform/email_to
  • fluentform/email_header
  • fluentform/email_footer
  • fluentform/email_styles
  • fluentform/email_template_footer_text
  • fluentform/email_attachments
  • fluentform/email_summary_body_text
  • fluentform/email_summary_footer_text
  • fluentform/email_content_type_header
  • fluentform/email_template_header_image
  • fluentform/email_template_email_heading
  • fluentform/email_template_colors
  • fluentform/nonce_verify
  • fluentform/popup_shortcode_defaults
  • fluentform/survey_shortcode_defaults
  • fluentform/itl_options
  • fluentform/ip_provider
  • fluentform/post_type_selection_types_args
  • fluentform/post_selection_types
  • fluentform/post_selection_posts_pre_data
  • fluentform/post_selection_label_by
  • fluentform/user_registration_field_defaults
  • fluentform/icontact_request_args
  • fluentform/user_registration_feed_fields
  • fluentorm/user_registration_creatable_roles
  • fluentform/payment_settings_{$method}
  • fluentform/payment_method_settings_validation_{$method}
  • fluentform/payment_submission_data
  • fluentform/submission_order_items
  • fluentform/payment_field_{$elementName}
  • fluentform/stripe_checkout_args
  • fluentform/uploader_args
  • fluentform/file_uploaded
  • fluentform/file_upload_params
  • fluentform/default_upload_path
  • fluentform/file_upload_validations
  • fluentform/file_upload_validation_error
  • fluentform/disable_inputmode
  • fluentform/file_type_options
  • fluentform/default_upload_path

Reference API Classes

  • BaseFieldManager Class
  • Integration Manager Class
  • PDF Template Manager Class
  • Base Payment Method Class
  • BaseProcessor Class

Data Definations

  • $submission_data Array
  • $form Object
View Categories
  • Home
  • Docs
  • Developer Documentation
  • Reference API Classes
  • Integration Manager Class

Integration Manager Class

Introduction #

The Fluent Forms Integration Manager Class provides developers with a very easy & simple solution to add new integration in a time-effective way. Follow this documentation to create your own Integration.

You just need to provide your Integration settings data structure and the fields will be automatically generated for you. Please check this Integration Feed – Fields API for the available input component that you can use for your integration settings.

You can extend this class to create your own Integration. Include the class using the following namespace.

use \FluentForm\App\Services\Integrations\IntegrationManager;

This class file location: /plugins/fluentform/app/Services/Integrations/IntegrationManager.php.

Please checkout the github file to get more information.

Methods #

__construct() #

This is the construct method of this class. This method needs to override. You have to pass a Application object and a few other required parameters. To pass Application object you can include it using the following namespace

use \FluentForm\Framework\Foundation\Application;

Here is an example of how you can override. You can use the following filter fluentform_notifying_async_{{integrationKey}} when developing the integration it will make debugging easier.

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 = '';                              // Integration details
 
    $this->logo = '/my-integration-image-file-path.png';  // Integration Logo
    $this->registerAdminHooks();                          // Internal Functions
    
//  add_filter('fluentform/notifying_async_{integrationKey}', '__return_false');
}

getGlobalFields() #

This method will need to return the settings data format for the integration API connection. You have to keep the structure as same as the example. This setting will store the API key & additional required data to connect with your Integration API.

Here is an example of the data format.

[
    'logo'             => $this->logo,                                         // Logo Path which was set in constructor
    'menu_title'       => __('Integration Settings', 'fluentform'),            // Integration Settins Title
    'menu_description' => __('Description', 'fluentform'),                     // Integration Settins Details
    'valid_message'    => __('Your API Key is valid', 'fluentform'),           // Valid API Message 
    'invalid_message'  => __('Your API Key is not valid', 'fluentform'),       // Invalid API Message
    'save_button_text' => __('Save Settings', 'fluentform'),                   // Settings Save Button tTxt
    'fields'           => [
        'apiKey' => [
            'type'       => 'text',                                            // API key type
            'label_tips' => __("Enter your Integration API Key", 'fluentform'),// Additional help text
            'label'      => __('Integration API Key', 'fluentform'),           // Input Label
        ]
    ],
    'hide_on_valid'    => true,                                                // Settings Input will be hidden on valid 
    'discard_settings' => [
        'section_description' => 'Your AwesomeIntegration is Activated',       // Discard Settings Page Description
        'button_text'         => 'Disconnect AwesomeIntegration',              // Discard Button Text
        'data'                => [
            'apiKey' => ''                                                     // Set API key to empty on discard
        ],
        'show_verify'         => true                                          // Show verification Option
    ]
];

getGlobalSettings() #

In this method, you will need to get your settings data using your option key and your default settings for the Settings. You will get one parameter here $settings.

Here is an example of the method:

 public function getGlobalSettings($settings)
    {
        $globalSettings = get_option($this->optionKey);
        if (!$globalSettings) {
            $globalSettings = [];
        }
        $defaults = [
            'apiKey' => '',
            'status' => ''
        ];

        return wp_parse_args($globalSettings, $defaults);
    }

saveGlobalSettings() #

Here you will get the settings data after user submission and you can use the data to connect with your API or do your required task. Then save the data or return the error using your own validation.

For example :

public function saveGlobalSettings($settings)
    {
        if (!$settings['apiKey']) {
            $mySettings = [
                'apiKey' => '',
                'status' => false
            ];
            
            update_option($this->optionKey, $mySettings, 'no');
            wp_send_json_success([
                'message' => __('Your settings has been updated and disconnected', 'fluentform'),
                'status'  => false
            ], 200);
        }

        // Verify API key
        try {
             
        // Connect with your api using the apiKey
        // Your code
            
        } catch (\Exception $exception) {
            wp_send_json_error([
                'message' => $exception->getMessage()
            ], 400);
        }

        // API key is verified now
        $settings = [
            'apiKey' => sanitize_text_field($settings['apiKey']),
            'status' => true
        ];

        // Update options with the key
        update_option($this->optionKey, $settings, 'no`');

        wp_send_json_success([
            'message' => __('Your MyAwesomeIntegration api key has been verfied and successfully set', 'fluentform'),
            'status'  => true
        ], 200);
    }

After you have successfully completed this step along with the previous methods, your integration will appear int the fluent form modules list.

image 24 2717

After you enable your new integration, you can go to the integration settings page where settings will be displayed according to your global field settings from getGlobalFields.

After the integration is up and running the integration needs to be pushed in the form feed, so a user can use this in his form. The following method will achieve this.

pushIntegration() #

Adding your integration into the form feeds. Here you will get two parameters $integrations, $formId,

Here is the screenshot when the integration is pushed :

image 25 2717

If the integration is configured it will push the integration into the form feed or else it will show a message to configure the API. The isConfigured() method, to check if the integration is configured is built in, you just need to call it.

public function pushIntegration($integrations, $formId)
{
    $integrations[$this->integrationKey] = [
        'title'                 => $this->title . ' Integration',
        'logo'                  => $this->logo,
        'is_active'             => $this->isConfigured(),
        'configure_title'       => 'Configuration required!',
        'global_configure_url'  => admin_url('admin.php?page=fluent_forms_settings#{your settings page url}'),
        'configure_message'     => 'MyAwesomeIntegration is not configured yet! Please configure your API first',
        'configure_button_text' => 'Set MyAwesomeIntegration API'
    ];
    return $integrations;
}

getIntegrationDefaults() #

This method will return your Integration feed setting’s default data format. You will get two parameters here $settings, $formId. Here is an example of this method.

[
    'name'                   => '',
    'id'                     => '',
    'fieldEmailAddress'      => '',
    'custom_field_mappings'  => (object)[],
    'default_fields'         => (object)[],
    'conditionals'           => [
                   'conditions' => [],
                   'status'     => false,
                   'type'       => 'all'
    ],
    'enabled' => true
];

getSettingsFields() #

This method will render input fields for the integration feed settings page, based on the returned input data format. You will get two parameters here $settings, $formId.

You can use the prebuilt input component to create your settings page, here is a documentation link where you can find the details list of these input components.

Required properties for the fields:

  • key: Settings Unique Key
  • label: Settings Input Label
  • component: Pass the prebuild input component.
[
    'fields' => [
        [
            'key'           => 'name',
            'label'         => 'Name',
            'required'      => true,
            'placeholder'   => 'Your Feed Name',
            'component'     => 'text'
        ],

        [
            'key'            => 'additional_fields',
            'label'          => 'Integration Fields',
            'sub_title'      => 'Please specify the data ',
            'required'       => true,
            'component'      => 'map_fields',
            'primary_fileds' => [
                [
                    'key'           => 'fieldEmailAddress',
                    'label'         => 'Email Address',
                    'required'      => true,
                    'input_options' => 'emails'
                ]
            ],
            'default_fields' => [
                [
                    'name'     => 'first_name',
                    'label'    => esc_html__('First Name', 'fluentformpro'),
                    'required' => false
                ],
                [
                    'name'     => 'last_name',
                    'label'    => esc_html__('Last Name', 'fluentformpro'),
                    'required' => false
                ],

            ]
        ],
        [
            'key'        => 'conditionals',
            'label'      => 'Conditional Logics',
            'tips'       => 'Push data to your Integration conditionally based on your submission values',
            'component'  => 'conditional_block'
        ],
        [
            'key'            => 'enabled',
            'label'          => 'Status',
            'component'      => 'checkbox-single',
            'checkbox_label' => 'Enable This feed'
        ]
    ],
    'integration_title' => $this->title
];

All your input fields will be generated dynamically based on your provided data. You can later fetch this data using your input keys and use it as you need in your integration after form submission. Here is an output screenshot of the above data format.

image 26 2717

In the default settings getIntegrationDefaults() we gave a value ‘enabled’ as true, that is why you can see that the field with this key ‘checkbox-single’ is checked which means it is true.

getMergeFields() #

In this method, you will get three parameters $list, $listId, and $formId.

This method is called after every select option change. When you have fields depending on one another, you need to modify subfields based on a primary field you can use this method and return modified data based on one primary field.

For reference check the Mailchimp integration

https://github.com/fluentform/fluentform/blob/master/app/Services/Integrations/MailChimp/MailChimpIntegration.php

notify() #

This method will be called upon form submission, you will get four parameters $feed, $formData, $entry, $form. This is the most important method, here you will your necessary task upon form submission

Here is a filter that you can use to validate your settings.

Further read #

fluentform/save_integration_value_{integrationKey} #

Filter hook for validating integration settings.

add_filter('fluentform/save_integration_value_{integrationKey} 'yourValidationMethodBeforeSave'), 10, 2);

Example of a validation:

 public function yourValidationMethodBeforeSave($settings, $integrationId)
    {   
        try {
            $error ="";                                   // check your conditions
            if( $error){
                throw new \Exception('Error message ');   // throw error
            }
           


        } catch (\Exception $e) {
            wp_send_json_error([
                'message' => $e->getMessage(),
                'status' => false
            ], 400);
        }

        return $settings;
    }
What are your Feelings
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on July 25, 2023
BaseFieldManager ClassPDF Template Manager Class

Powered by BetterDocs

Table of Contents
  • Introduction
  • Methods
    • __construct()
    • getGlobalFields()
    • getGlobalSettings()
    • saveGlobalSettings()
    • pushIntegration()
    • getIntegrationDefaults()
    • getSettingsFields()
    • getMergeFields()
    • notify()
  • Further read
    • fluentform/save_integration_value_{integrationKey}

Fluent Forms is a lightweight, fastest WordPress contact form plugin empowering 500K+ businesses worldwide.

Email Newsletter

fluentform Newsletter Inline
Free tutorials, exclusive contents & more.
Facebook Facebook Group Twitter Instagram Linkedin YouTube WordPress

Resources

  • Account
  • Contact Us
  • Get Support
  • Brand Guideline
  • Changelog
  • Documentation
  • Developers Docs
  • API Docs
  • Report a Security Issue

Addons

  • Signature
  • PDF Generator (Free)
  • Mautic (Free)
  • Mailpoet (Free)

Calculators

  • BMI Calculator
  • GKI Calculator
  • Pay Raise Calculator
  • VAT Calculator
  • Fuel Cost Calculator
  • All Calculator Forms

Comparison

  • Free vs. Pro
  • Fluent Forms vs. WPForms
  • Fluent Forms vs. Gravity Forms
  • Fluent Forms vs. Ninja Forms
  • Fluent Forms vs. Forminator

Miscellaneous

  • Features Available in Free Version
  • Free Form Templates
  • Form Templates
  • Quick Start Guide
  • Fluent Forms Integrations

Features

  • Conversational Forms
  • Multi-Step Forms
  • Conditional Logic
  • Numeric Calculation
  • Payment
  • Quiz and Survey
  • Form Security
  • Advanced Form Styler
  • Advanced Post Creation
  • Address Autocomplete
  • Form to PDF

OUR PRODUCTS

  • FluentCommunity
  • FluentCRM
  • FluentBooking
  • FluentBoards
  • Fluent Support
  • FluentSMTP
  • Ninja Tables
  • WP Social Ninja
  • Paymattic
  • AzonPress
  • FluentSnippets

Copyright © 2025 Fluent Forms, a brand of WPManageNinja™.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The Free Version of Fluent Forms is Ready! We’ll send it to your email.
Direct Download – CTA- Homepage

By downloading you agree to our terms of use and privacy policy.

  • Pricing
  • Features
  • Templates
  • Integrations
  • Blog
  • Docs
  • Account