liveBook · Manning

Name attribute

As explained in Build a Website with ChatGPT

The HTML name attribute assigns the field name used to identify a form control when its form is submitted.

The HTML name attribute gives a form control the field name the browser uses when submitting the form. It connects each submitted value with the field it belongs to. section 8.5.1

A submitted field

If a form control has name="email", the submitted form data identifies its value as email. Other controls might use names such as name, skills, day, gift, and notify. Radio buttons and selection-list options use value attributes to provide the selected value, while the name identifies the field. section 8.5.1

When customizing a generated form, change visible text or allowed value strings carefully, but do not change the type or name attribute values unless you intend to change how the form data is identified. section 8.6

How Build a Website with ChatGPT covers it

How deep it goes
Explains the submission role with field examples and distinguishes names from selected value attributes.
Examples
Uses event sign-up fields named name, email, skills, day, gift, and notify, plus a hidden _gotcha field.
What it assumes
Assumes basic HTML form familiarity while explaining the attribute’s submission purpose through concrete controls.
What you can do after
Apply it by preserving meaningful name values so submitted form data identifies each control correctly.
How it connects
Connects HTML forms with form controls, form submission, radio buttons, selection lists, and the value attribute.

Also explained in

Compare how 2 books explain name attribute →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.