Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #943766

    Hi, I am currently testing the usage of pop-up functionality in order to offer an e-book subscription pop-up window on our start page https://kompetenz-check.ch, poping up after four seconds.
    We so far managed to implement it along with some support tickets, thus using the following code on the child functions.php – however, the code does not display the forms full size so that the user will have to scroll down on the window. Also we are looking for a solution to have the background colour of the window changed in line with the start page colour, e.g. #6786a1. For your reference, you will find in the first footer column two E-Book related links (called “Bestellformular”, one was composed with an iframe tag, the other with a prettyPhoto tag. The latter one displays the form in its full size.

    Following is the code:
    function add_custom_script(){
    ?>
    <script>
    (function($){
    $(window).load(function() {
    setTimeout(function(){ $(‘.popup_trigger’).trigger(‘click’) }, 4000);
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_script’);

    #944603

    Hey René,
    Unfortunately you can’t change the background color of the iframe because of cors policies and they are also using !important; on the background color.
    But you can reduce the scale of the form and increase the iframe to show the full form via css, Try this code in the General Styling > Quick CSS field:

    div.mfp-iframe-scaler,#_form_32_._form _form_32 _inline-form  {
    height: 150vh !important; 
    }
    
    iframe {
      -moz-transform: scale(0.70, 0.70); 
      -webkit-transform: scale(0.70, 0.70); 
      -o-transform: scale(0.70, 0.70);
      -ms-transform: scale(0.70, 0.70);
      transform: scale(0.70, 0.70); 
      -moz-transform-origin: top left;
      -webkit-transform-origin: top left;
      -o-transform-origin: top left;
      -ms-transform-origin: top left;
      transform-origin: top left;
    }
    
    

    Feel free to adjust to suit.

    Best regards,
    Mike

    #944623

    Hi Mike, Great, works nicely. Thanks a lot!
    Cheerio, René

    #944674

    Hi,

    I’m glad you got this corrected. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adjust Pop-up frame size and colour’ is closed to new replies.