Open YuezhenQin opened 8 months ago
Form Design Patterns was written by Adam Silver and reviewed by Heydon Pickering.
Despite the registration form’s basic appearance, there are many things to consider: the primitive elements that make up a form (The form is made up of four fields and a submit button. Each field is made up of a control (the input) and its associated label), ways to reduce effort, all the way through to form validation.
In this chapter, we’ll design a flight booking service. At first glance this may seem a bit niche, especially when compared to “A Registration Form” and “A Checkout Form.” However, we’re going to explore several complex problems that, in the end, will result in reusable patterns — patterns that are very much transferable to other problem domains.
Group the relevant inputs together such that only one input from a pair can be selected at a time.
Step 34 To prevent unnecessary repetition, target the before pseudo-element of the p element, and give it a content property of "Question #".