• Resolved monika064

    (@monika064)


    Hi, when someone clicks “Show results” on the poll, the page reloads and takes them back to the top of the page. My polls are always at the bottom of the page which means people have to scroll all the way down again to see the results (or they get confused and never reach it).

    Is there a way to prevent page reload when people want to see the results. Results Display is set to “Link on poll” and Submission Method is set to Ajax if that’s important for anything.

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

    (@wpmudevsupport12)

    Hi @monika064

    Sorry to hear you are having this issue.

    I was able to replicate this issue and reported it to our developers.

    Can you please try the above code as a mu-plugin?

    <?php
    
    add_action( 'wp_footer', 'wpmudev_fix_poll_view', 9999 );
    
    function wpmudev_fix_poll_view() {
    	
    	$is_result = ( isset( $_GET['results'] ) && $_GET['results'] == true ) ? true : false;  
    	
        if ( !$is_result ) {
            return;
        }
    	?>
    	<script type="text/javascript">
    	jQuery( document ).ready( function($){
    		setTimeout(function() {
    			$('.forminator-ui').trigger('after.load.forminator');
    		},1000);
    
    		$(document).on('after.load.forminator', function(event, form_id) {
    		    $([document.documentElement, document.body]).animate({
                    scrollTop: $(".forminator-ui").offset().top - 100
                }, 100);
    		});
    	});
    	</script>
    	<?php
    }

    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Let us know the result you got.
    Best Regards
    Patrick Freitas

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @monika064 ,

    We haven’t heard from you for several days now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

    Thread Starter monika064

    (@monika064)

    Hi, sorry for the late reply, I forgot about this ticket. Is there any other way other than installing this MU plugin? I’m not well-versed in WordPress so don’t feel very comfortable doing this. It’s easier for me to just switch to another plugin. Thank you.

    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @monika064,

    I hope you are doing well today!

    In fact, using mu-plugin is the safest and easiest way. You can also try adding the above code without the first two lines (starting from add_action) and add to your child theme’s functions.php.

    However, we prefer to do that as mu-plugins, you can find another description below on how to use mu-plugins on https://www.ads-software.com/support/article/must-use-plugins/

    Kind regards,
    Zafer

    Thread Starter monika064

    (@monika064)

    Ok, thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page reload after clicking “show results”’ is closed to new replies.