--- id: 60fad1cafcde010995e15306 title: Step 36 challengeType: 0 dashedName: step-36 --- # --description-- With form submissions, it is useful, and good practice, to provide each submittable element with a `name` attribute. This attribute is used to identify the element in the form submission. Go ahead, and give each submittable element a unique `name` attribute of your choosing. _Except for the two `radio` inputs._ # --hints-- You should give the `input` expecting a first name a `name` attribtute. _PS I would have chosen `first-name`_ ```js assert.isNotEmpty(document.querySelector('fieldset:nth-child(1) > label:nth-child(1) > input')?.name); ``` You should give the `input` expecting a last name a `name` attribute. _PS I would have chosen `last-name`_ ```js assert.isNotEmpty(document.querySelector('fieldset:nth-child(1) > label:nth-child(2) > input')?.name); ``` You should give the `email` a `name` attribute. _PS I would have chosen `email`_ ```js assert.isNotEmpty(document.querySelector('input[type="email"]')?.name); ``` You should give the `password` a `name` attribute. _PS I would have chosen `password`_ ```js assert.isNotEmpty(document.querySelector('input[type="password"]')?.name); ``` You should give the `checkbox` a `name` attribute. _PS I would have chosen `terms`_ ```js assert.isNotEmpty(document.querySelector('input[type="checkbox"]')?.name); ``` You should give the `file` a `name` attribute. _PS I would have chosen `file`_ ```js assert.isNotEmpty(document.querySelector('input[type="file"]')?.name); ``` You should give the `number` a `name` attribute. _PS I would have chosen `age`_ ```js assert.isNotEmpty(document.querySelector('input[type="number"]')?.name); ``` You should give the `select` element a `name` attribute. _PS I would have chosen `referrer`_ ```js assert.isNotEmpty(document.querySelector('select')?.name); ``` You should give the `textarea` element a `name` attribute. _PS I would have chosen `bio`_ ```js assert.isNotEmpty(document.querySelector('textarea')?.name); ``` You should not give any of the `option` elements a `name` attribute. ```js [...document.querySelectorAll('option')]?.forEach(option => assert.isUndefined(option?.name)); ``` You should not give any of the `label` elements a `name` attribute. ```js [...document.querySelectorAll('label')]?.forEach(label => assert.isUndefined(label?.name)); ``` You should not give any of the `fieldset` elements a `name` attribute. ```js [...document.querySelectorAll('fieldset')]?.forEach(fieldset => assert.isEmpty(fieldset?.name)); ``` # --seed-- ## --seed-contents-- ```html
Please fill out this form with the required information
``` ```css body { width: 100%; height: 100vh; margin: 0; background-color: #1b1b32; color: #f5f6f7; } label { display: block; margin: 0.5rem 0; } ```