{"id":213,"date":"2010-12-22T05:05:04","date_gmt":"2010-12-22T13:05:04","guid":{"rendered":"http:\/\/sethjust.com\/?p=213"},"modified":"2010-12-23T16:40:28","modified_gmt":"2010-12-24T00:40:28","slug":"submit-an-html-form-using-the-enter-key","status":"publish","type":"post","link":"https:\/\/sethjust.com\/2010\/12\/22\/submit-an-html-form-using-the-enter-key\/","title":{"rendered":"Submit an HTML form using the enter key, without JavaScript"},"content":{"rendered":"
I was delving into some simple PHP coding for the first time in a while, and was having trouble getting a form to submit when I pressed enter. Googling was ineffective, and only seemed to come up with javascript approaches, which I wanted to avoid. However, this<\/a> StackOverflow question suggested the answer: add a<\/p>\n attribute to the submit button. I did this, and everything worked beautifully.<\/p>\n","protected":false},"excerpt":{"rendered":" I was delving into some simple PHP coding for the first time in a while, and was having trouble getting a form to submit when I pressed enter. Googling was ineffective, and only seemed to come up with javascript approaches, which I wanted to avoid. However, this StackOverflow question suggested the answer: add a hidefocus=”true” […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[21,123,124,122,84],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/213"}],"collection":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":3,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/213\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}hidefocus=\"true\"<\/pre>\n