Hi!
Must <input type="submit ...> have a name attribute?
Thanks
| SitePoint Sponsor |


Hi!
Must <input type="submit ...> have a name attribute?
Thanks


As far as I know, the use of the name attribute in this case is to allow for multiple submit buttons. I'm not 100% positive on that though.
So unless you need multiple submit buttons--actually, input elements with the type set to "submit" but you get the idea (for example if you have multiple forms on a page) you won't need it.
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns


No, it doesn't. If you have multiple submit buttons in a form, you'll want to name them, though, in order to tell which button was used to submit the form. Just as Dan said.
Birnam wood is come to Dunsinane


Oh, now you show up, Tommy. So this is what I get for holding the fort until the cavalry arrives?
![]()
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
Bookmarks