• Resolved Purgel Zoltán

    (@purgelzoltan)


    Forminator is an excellent plugin, thanks to the developers!
    I have a bug that I would like to ask for help with.
    I am creating a poll that is embedded on the main page. When someone opens the main page, they jump to the poll.
    How can I prevent it from jumping there?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @purgelzoltan

    I hope you are doing well, we are happy to hear you feel the plugin is a great option.

    It is an expected behaviour when user voted on poll, it will focus the poll result.

    If you would like to bypass it you can use this code:

    <?php 
    
    add_action(
    	'wp_footer',
    	function() {
    		if ( wp_script_is( 'forminator-front-scripts', 'done' ) ) {
    			echo '<script>
                (($)=>{
                    $(document).ready(function() {	                    
    					if( $(".forminator-poll-18896 canvas").length ) {
    						window.scrollTo(0, 0);
    					}                    
                    });
                })(jQuery);
            </script>';
    		}
    	},
    	1000
    );

    Add it as mu-plugin https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins, I already used your poll ID, so once the mu-plugin is added, flush all caches and check if the scroll is gone.

    I also forwarded it to our developers letting them know it was causing a bad experience in your website.

    Best Regards
    Patrick Freitas

    Hi @purgelzoltan

    We haven’t heard from you in a while, I’ll go and mark this thread as resolved. If you have any additional questions or require further help, please let us know!

    Kind Regards,
    Kris

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Jump to poll’ is closed to new replies.