4 Replies - 445 Views - Last Post: 24 October 2019 - 01:02 PM Rate Topic: -----

#1 holthaunt   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 10-February 17

Added form to webpage, index.php load at bottom of page where form is.

Posted 23 October 2019 - 02:00 PM

Hello, I'm new to php. I just added my first bit of php to my site with an email form with reCaptcha. The original, index.html, had an iframe with a non-php form in it. Once I update the form with an php email form with reCaptcha I just added it to the original page, removing the iframe. I changed the index.html to index.php and posted it. Now when my site loads, it loads where the form is, at the bottom of the page. What do I need to do to have my page load at the top instead. Thanks for any help.

Is This A Good Question/Topic? 0
  • +

Replies To: Added form to webpage, index.php load at bottom of page where form is.

#2 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2494
  • View blog
  • Posts: 7,551
  • Joined: 15-January 14

Re: Added form to webpage, index.php load at bottom of page where form is.

Posted 23 October 2019 - 04:10 PM

Do you have an example online? I'm not sure what issue you're describing. Are you saying when you open the page the browser automatically scrolls down?
Was This Post Helpful? 0
  • +
  • -

#3 holthaunt   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 10-February 17

Re: Added form to webpage, index.php load at bottom of page where form is.

Posted 23 October 2019 - 04:27 PM

Hey, ArtificialSoldier. Quick note, I tried thanking you and posting results for your help with the form in another thread, but I keep getting blocked when I tried to post it. I have another thread about that in the "Site&Questions"(https://www.dreamincode.net/forums/topic/417650-blocked-for-viewing-post-and-posting/) section, so thanks for all your help.

Here is the website for the above issue: https://hotdogsbyhenry.com/

Thanks again.

This post has been edited by holthaunt: 23 October 2019 - 04:29 PM

Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2494
  • View blog
  • Posts: 7,551
  • Joined: 15-January 14

Re: Added form to webpage, index.php load at bottom of page where form is.

Posted 23 October 2019 - 05:08 PM

Try to remove the autofocus attribute on that first element, maybe the browser will scroll to whatever is focused.
Was This Post Helpful? 0
  • +
  • -

#5 holthaunt   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 10-February 17

Re: Added form to webpage, index.php load at bottom of page where form is.

Posted 24 October 2019 - 01:02 PM

Thanks, ArtificialSoldier. Removing
autofocus
from the first input field of the form did the trick. Page now loads from the top of the page. Again, thanks for all your help.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1