Site logo

[Resolved] Need to trigger modal pop-up with GB button click

Home Forums Support [Resolved] Need to trigger modal pop-up with GB button click

Home Forums Support Need to trigger modal pop-up with GB button click

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2404341
    Sasha

    Hello,

    I have some HTML code provided by ConvertKit which I need to link to a GB button in order to trigger a modal pop-up.

    I’ve currently got a workaround in place wherein the button click loads an identical page with a modal that pops up in 0 seconds, but obviously that’s not a great solution.

    Thanks for any help you can provide!

    #2404365
    Fernando
    Customer Support

    Hi Sasha,

    The Trigger modal HTML has a link, which you can directly copy and paste to a GB Button link input box.

    As for the data-formkit-toggle if you have GenerateBlocks Pro, you can add it through the Block Settings in the Advanced section. Reference: https://docs.generateblocks.com/article/custom-attributes/

    #2404394
    Sasha

    Thanks Fernando! I do have GenerateBlocks Pro… But forgive me, how should I enter the data-formkit-toggle value? Is is a “custom attribute”?

    Ideally the modal would open on-page (as it does on the page I just dropped in the private info section), versus redirecting to the modal’s external instance.

    #2404413
    Fernando
    Customer Support

    Yes, it’s a custom attribute which you can add in the Advanced Settings of the Block. Just click on Add Attribute.

    Can you share the complete HTML code provided? For reference, some pop-up links need such a structure: https://superdevresources.com/open-links-popup/#:~:text=HTML%20%2B%20JavaScript%20code%20for%20Popup

    Let us know.

    #2404430
    Sasha

    Thank you! Everything seems to be working now that I entered in the attribute info.

    The complete HTML code was shared in my first post, but I did also need to use the ConvertKit plugin to “place” the modal on the page so it could pop up upon link click 🙂

    #2404438
    Fernando
    Customer Support

    I see. Glad it’s working now! You’re welcome Sasha! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.