• Resolved DannyG

    (@dannygarcia1971)


    Dear Fluent Forms Support Team,

    I hope this message finds you well.

    I am currently utilizing Fluent Forms on my WordPress website and have encountered a scenario where multiple buttons on a page trigger a popup form for users to submit their name and phone number. Upon form submission, I receive an email notification. However, I would like to track which specific button the user clicked to open the form and include this information in the email notification I receive.

    Could you please guide me on how to implement a solution within Fluent Forms that allows capturing the button’s identifier and passing it along with the form submission? If there’s a feature or a method within Fluent Forms to achieve this, I would greatly appreciate your instructions on setting it up.

    Thank you for your assistance. I look forward to your prompt response and a solution to enhance my form tracking capabilities.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Amimul Ihsan

    (@amimulihsanmahdi)

    Hello There,

    I am afraid the use case you are looking for is not possible with Fluent Forms. However, you may try the shortcode {embed_post.post_title} on a hidden field on your form as the default value. If the pop up has a title, Fluent Forms will try to capture the title from the embedded section. Please note that his might not work if the form is embedded into page directly.

    Thank you

    Thread Starter DannyG

    (@dannygarcia1971)

    Hello,

    I wanted to share the solution I found for tracking the button identifier that triggers a popup form submission in Fluent Forms on a WordPress site. Here’s a brief overview of how I resolved the issue:

    1. I assigned a unique “Button ID” to each Elementor button that opens the popup form.
    2. In the Fluent Forms settings under “Settings & Integrations,” I added the following JavaScript code in the “Custom CSS & JS” tab:

    jQuery(document).ready(function($) {
    $('a[id]').on('click', function() {
    var buttonId = this.id;
    setTimeout(function() {
    var hiddenField = $('input[name="source_button"]');
    if(hiddenField.length > 0) {
    hiddenField.val(buttonId);
    }
    }, 1000);
    });
    });

    1. I created a hidden field in the Fluent Form with the name matching the one used in the JavaScript code (in this case, ‘source_button’). Important: You should put this name (source_button) in “Name Attribute” field.
    2. I configured the email notification in Fluent Forms to include the value of the hidden field, which now contains the button’s ID. In my case it was {inputs.source_button}

    Now, whenever a user clicks a button and submits the form, I receive an email notification indicating which button was pressed.

    For anyone who might face a similar issue, I hope this helps. I’m also quite surprised that the official support was not aware of a solution to this simple query, and I believe they should reconsider the support provided for such straightforward functionalities.

    Best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tracking Button Clicks for Popup Form Submissions’ is closed to new replies.