danieliser
7/4/2016 - 6:03 PM

Use this to convert form values into a url, then change the iFrame src inside a Popup Maker popup, before opening the popup.

Use this to convert form values into a url, then change the iFrame src inside a Popup Maker popup, before opening the popup.

(function ($, document) {
    // Customize these variables.
    // ----------------------------------
    var popupID = 123,
        form = $('#form'),
        // ------------------------------
        // End Customizations.
        baseURL = form.attr('action'),
        popup = $('#pum-' + popupID),
        iframe = popup.find('iframe').eq(0);

    $(form).on('submit', function (e) {
        var querystring = form.serialize();

        e.preventDefault();

        iframe.attr('src', baseURL + "?" + querystring);
        popup.popmake('open');
    });
}(jQuery, document));