• top-node

    (@top-node)


    I have a Contact Form 7 form with a hidden field. On my Divi page I have 4 buttons that show the popup with the form. I want to pass a string to the form in the popup and then populate the hidden field. Is this possible or do I need to create 4 different forms for this?
    The latter is not great, as this increase the size of the page.

Viewing 1 replies (of 1 total)
  • Hello @top-node ??

    Apologize for all the inconvenience!

    Unfortunately, nothing can be passed to a Popup. The Popup is created during page load and is static. When the Popup is opened, it simply changes from “hidden” to “visible”, but the actual content is already defined (i.e. the hidden field is there with the initial value).

    The easy solution is to create 4 Popups with 4 different forms.
    The flexible solution involves creating a JS snippet, but that’s a little too complex to cover here. A basic sample on how to initialize a form field with a dynamic value is here: https://tinyurl.com/y2fpzllz

    Please do get back to me, in-case of any query.

    Regards,
    Syed

Viewing 1 replies (of 1 total)
  • The topic ‘Populating hidden field from trigger button’ is closed to new replies.