PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Issues Adding Auto Focus to Gravity Forms

  1. Hello there I am having some difficulty auto focusing the first field of a Gravity Form being used inside a Fancybox popup.

    I have tried traditional body onload JavaScript snippets as well as jQuery implementations but alas... no luck.

    Here is my jQuery:

    <script type="text/javascript">
    $(document).ready(function(){
      document.myGformID.myGformInputID.focus();
    });
    </script>

    Any idea what might be causing this issue? I assume it is something blatantly obvious but I have looked around and found no answers on the web.

    Thanks!

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  2. Can you send us a link to your form? I will need to take a look at how your markup is structured to be able to give you a good answer.

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  3. Thanks Alex -- Try this one:
    http://www.portalcfo.com/popup-test/

    Posted 13 years ago on Wednesday July 13, 2011 | Permalink
  4. Try this:

    <script type="text/javascript">
    	jQuery(document).ready(function(){
    	  jQuery("#input_6_8").focus();
    	});
    </script>
    Posted 13 years ago on Wednesday July 13, 2011 | Permalink