Support » Plugin: Easy FancyBox » Passing GET-Parameter to Fancybox (inline content)

  • Resolved Heiko Mitschke

    (@antares7)


    Hello!

    First of all, thanks for sharing your great plugin!

    I use fancybox to open a contact form as described in you FAQ. Everything is fine. But I would like to know whether and how it is possible to pass a get-parameter to fancybox box.

    So this is what I would like to have:
    <a href="#contact_form_1?your-subject=Subject" class="fancybox-inline">Link</a>

    Is this possible somehow?

    Thanks in advance!

    Regards,
    Heiko

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RavanH

    (@ravanh)

    Hi, I’M m afraid trying to pass data like that will not do anything… Your best option is to create different submit forms for each case instead of trying to use one form with different submit data.

    Hi!

    Thanks for your quick answer! 🙂
    I already thought about this solution. The problem is that I would have to create hundreds of forms manually for my CPT and this is not possible to do.

    Regards,
    Heiko

    Plugin Author RavanH

    (@ravanh)

    Yeah, I see your point…

    Sadly, I don’t see how a contact form could take URL parameters specially since the form is inline (meaning they are already present while hidden on the page) and not loaded after the click/request.

    Or you’d have to write some javascript (jQuery) that will pass the URL value to the proper form field…

    Yes, that is exactly what I did now. I gave my anchor-elements a data-attribute and inserted this in my popup form with some JavaScript when clicked a that link. 🙂

    So, thanks again for your answers!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @mikebang Don’t report old topics like this.

    mbang

    (@mikebang)

    I solved the issue and didn’t know how to reopen the thread but wanted to provide the solution to help others.

    Instead of coding:
    `Link

    Do it this way
    Link

    and the form should be able to pull your query string into a field. I was able to do this in Gravity Forms via

    https://docs.gravityforms.com/using-dynamic-population/#query-string

    • This reply was modified 1 year ago by  mbang.
    • This reply was modified 1 year ago by  mbang.
    • This reply was modified 1 year ago by  mbang.
    • This reply was modified 1 year ago by  mbang.
    • This reply was modified 1 year ago by  mbang.
    • This reply was modified 1 year ago by  mbang.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Passing GET-Parameter to Fancybox (inline content)’ is closed to new replies.