• Resolved websitesupport247

    (@websitesupport247)


    Hi,

    Can you advise the best way to set ‘autofocus’ on the field so the cursor set & blinking on page load?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    The only way to do that is via custom coding it. It should not be too difficult though.

    add_action("wp_footer", "asp_custom_script_wp_footer");
    function asp_custom_script_wp_footer() {
    	?>
    	<script>
    	jQuery(function($){
    	    setTimeout(function() {$('input.orig').focus();}, 1000);
    	});
    	</script>
    	<?php
    }

    Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    Best,
    Ernest M.

    Thread Starter websitesupport247

    (@websitesupport247)

    Hi Ernest,

    Appreciate the, quick, response (thx!)
    Yes, I found that code snippet from another post and added to the theme but not working, unfortunately.

    brgds,
    Thounda

    Plugin Author wpdreams

    (@wpdreams)

    Hi Thounda,

    I checked the page source on the site you linked in your first post, but I can’t see the code printed to the page anywhere. Make sure the code is in the correct file and clear all layers of cache.

    Best,
    Ernest M.

    Thread Starter websitesupport247

    (@websitesupport247)

    User error – type-O.
    Works perefectly! (thx!)

    Plugin Author wpdreams

    (@wpdreams)

    Great ??

    I will mark this as resolved then. Feel free to rate the plugin if you like it, it is greatly appreciated.

    Best,
    Ernest M.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Set Cursor to form field on page load’ is closed to new replies.