Jump to content

One input assigned to multiple forms


Trebor Almasy

Recommended Posts

I was reading about the HTML5 form attributes here:http://www.w3schools.com/html/html5_form_attributes.aspSpecifically the part:

Tip: To refer to more than one form, use a space-separated list of form ids.But for the life of me I can't get it to work.I know you can easily do it with Javascript (as I have it now), but if you can do it just as easily with HTML, I figure why not.Any ideas why this may not be working (I tried both Chrome and FF).

 

Link to comment
Share on other sites

I'm not sure what browser you're testing in, but Internet Explorer doesn't support the form attribute. I believe the value is case sensitive, so "Form1" would be different than "form1"

 

Well, I am testing in Firefox and it seems that assigning an input to multiple forms isn't supported. I guess there's nothing to do about it.

 

Here's Mozilla's description:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input

 

Form

The form element that the input element is associated with (its form owner). The value of the attribute must be an id of a <form> element in the same document. If this attribute is not specified, this <input> element must be a descendant of a <form> element. This attribute enables you to place <input> elements anywhere within a document, not just as descendants of their form elements. An input can only be associated with one form.

Edited by Ingolme
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...