DOM clobbering
- Avoid using the names of built-in
formproperties with thenamecontent attribute.
- can have a form owner
- form owner defaults to its ancestor
formelement
- form owner defaults to its ancestor
«button»«fieldset»«input»«object»«output»«select»«textarea»«img»- form-associated custom elements
form element.
- are in the
form.elementsandfieldset.elementsAPIs. - have a
formcontent and IDL attribute used to set a form owner.
«button»«fieldset»«input»«object»«output»«select»«textarea»- form-associated custom elements
form attribute set to ID of form element in its tree.
- can be used in the entry list when a
formelement is submitted.
«button»«input»«object»«select»«textarea»- form-associated custom elements
- can be affected when a
formelement is reset.
«input»«output»«select»«textarea»- form-associated custom elements
- can be associated with a label element.
«button«input(iftype!=hidden)«meter«output«progress«select«textarea- form-associated custom elements
«maxlengthsets upper limit on number of characters: aka maximum allowed value length«minlengthsets lower limit on number of characters: aka minimum allowed value length- if empty string is not allowed,
requiredmust be set
- if empty string is not allowed,
Field name Meaning Canonical Format Control group
nameFull name Free-form text, no newlinesTexthonorific-prefixPrefix or title (e.g. "Mr.", "Ms.", "Dr.", "Mlle") Free-form text, no newlinesTextgiven-nameGiven name (in some Western cultures, also known as the first name) Free-form text, no newlinesTextadditional-nameAdditional names (in some Western cultures, also known as middle names, forenames other than the first name) Free-form text, no newlinesTextfamily-nameFamily name (in some Western cultures, also known as the last name or surname) Free-form text, no newlinesTexthonorific-suffix"Suffix (e.g. "Jr.", "B.Sc.", "MBASW", "II") Free-form text, no newlinesTextnicknameNickname, screen name, handle: a typically short name used instead of the full name Free-form text, no newlinesTextorganization-titleJob title (e.g. "Software Engineer", "Senior Vice President", "Deputy Managing Director") Free-form text, no newlinesTextusernameA username Free-form text, no newlines Usernamenew-passwordA new password (e.g. when creating an account or changing a password) Free-form text, no newlinesPasswordcurrent-passwordThe current password for the account identified by the username field (e.g. when logging in) Free-form text, no newlinesPasswordone-time-codeOne-time code used for verifying user identity Free-form text, no newlines PasswordorganizationCompany name corresponding to the person, address, or contact information in the other fields associated with this field Free-form text, no newlinesTextstreet-addressStreet address (multiple lines, newlines preserved) Free-form textMultilineaddress-line1Street address (one line per field) Free-form text, no newlinesTextaddress-line2Free-form text, no newlinesTextaddress-line3Free-form text, no newlinesTextaddress-level4The most fine-grained administrative level, in addresses with four administrative levels Free-form text, no newlinesTextaddress-level3The third administrative level, in addresses with three or more administrative levels Free-form text, no newlinesTextaddress-level2The second administrative level, in addresses with two or more administrative levels; in the countries with two administrative levels, this would typically be the city, town, village, or other locality within which the relevant street address is found Free-form text, no newlinesTextaddress-level1The broadest administrative level in the address, i.e. the province within which the locality is found; for example, in the US, this would be the state; in Switzerland it would be the canton; in the UK, the post town Free-form text, no newlinesTextcountryCountry code Valid ISO 3166-1-alpha-2 country code [ISO3166]Textcountry-nameCountry name Free-form text, no newlines; derived from country in some casesTextpostal-codePostal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX", and the arrondissement, if relevant, to the address-level2 field) Free-form text, no newlinesTextcc-nameFull name as given on the payment instrument Free-form text, no newlinesTextcc-given-nameGiven name as given on the payment instrument (in some Western cultures, also known as the first name) Free-form text, no newlinesTextcc-additional-nameAdditional names given on the payment instrument (in some Western cultures, also known as middle names, forenames other than the first name) Free-form text, no newlinesTextcc-family-nameFamily name given on the payment instrument (in some Western cultures, also known as the last name or surname) Free-form text, no newlinesTextcc-numberCode identifying the payment instrument (e.g. the credit card number) ASCII digitsTextcc-expExpiration date of the payment instrument Valid month stringMonthcc-exp-monthMonth component of the expiration date of the payment instrument Valid integer in the range 1..12Numericcc-exp-yearYear component of the expiration date of the payment instrument Valid integer greater than zeroNumericcc-cscSecurity code for the payment instrument (also known as the card security code (CSC), card validation code (CVC), card verification value (CVV), signature panel code (SPC), credit card ID (CCID), etc) ASCII digitsTextcc-typeType of payment instrument Free-form text, no newlinesTexttransaction-currencyThe currency that the user would prefer the transaction to use ISO 4217 currency code [ISO4217]Texttransaction-amountThe amount that the user would like for the transaction (e.g. when entering a bid or sale price) Valid floating-point numberNumericlanguagePreferred language Valid BCP 47 language tag [BCP47]TextbdayBirthday Valid date string Datebday-dayDay component of birthday Valid integer in the range 1..31Numericbday-monthMonth component of birthday Valid integer in the range 1..12Numericbday-yearYear component of birthday Valid integer greater than zeroNumericsexGender identity (e.g. Female, Fa'afafine) Free-form text, no newlinesTexturlHome page or other web page corresponding to the company, person, address, or contact information in the other fields associated with this field Valid URL stringURLphotoPhotograph, icon, or other image corresponding to the company, person, address, or contact information in the other fields associated with this field Valid URL stringURLtelFull telephone number, including country code ASCII digits and U+0020 SPACE characters, prefixed by a U+002B PLUS SIGN character (+)Teltel-country-codeCountry code component of the telephone number ASCII digits prefixed by a U+002B PLUS SIGN character (+)Texttel-nationalTelephone number without the county code component, with a country-internal prefix applied if applicable ASCII digits and U+0020 SPACE charactersTexttel-area-codeArea code component of the telephone number, with a country-internal prefix applied if applicable ASCII digitsTexttel-localTelephone number without the country code and area code components ASCII digitsTexttel-local-prefixFirst part of the component of the telephone number that follows the area code, when that component is split into two components ASCII digitsTexttel-local-suffixSecond part of the component of the telephone number that follows the area code, when that component is split into two components ASCII digitsTexttel-extensionTelephone number internal extension code ASCII digitsTextemailEmail address Valid email addressUsernameimppURL representing an instant messaging protocol endpoint (eg, "aim:goim?screenname=example") Valid URL stringURL