You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
A native form element provides the elements property which contains a list of all the elements in the form (input, select, ...). However one would expect to use paper-input or other web-components that Polymer provides. elements of a native form element ignores tags that it doesn't know so for instance, this :
<iron-form><formid="myForm"><paper-inputname="firstname" label="firstname"></paper-input><paper-inputname="lastname" label="lastname"></paper-input><inputtype="hidden" name="id" value="1"></form></iron-form><script>console.log(window.myForm.elements);// only contains the native hidden type input (id)</script>
That'd be great if one could do :
<iron-formid="mySuperForm"><form><paper-inputname="firstname" label="firstname"></paper-input><paper-inputname="lastname" label="lastname"></paper-input><inputtype="hidden" name="id" value="1"></form></iron-form><script>console.log(window.mySuperForm.elements);// returns all the three elements (firstname, lastname, id)</script>
The text was updated successfully, but these errors were encountered:
A native
form
element provides theelements
property which contains a list of all the elements in the form (input
,select
, ...). However one would expect to usepaper-input
or other web-components that Polymer provides.elements
of a nativeform
element ignores tags that it doesn't know so for instance, this :That'd be great if one could do :
The text was updated successfully, but these errors were encountered: