From 580395130327562cb7e4976919081d3fa83f2702 Mon Sep 17 00:00:00 2001 From: jjennings7 <48838320+jjennings7@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:03:58 -0700 Subject: [PATCH] Updated Optional versus required fields section (#2528) Updated documentation to include the use of (required) as well as (optional). Co-authored-by: Lauren Rice <43969356+laurenmrice@users.noreply.github.com> --- src/pages/components/form/usage.mdx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/pages/components/form/usage.mdx b/src/pages/components/form/usage.mdx index 53b5d212099..f542d12e616 100755 --- a/src/pages/components/form/usage.mdx +++ b/src/pages/components/form/usage.mdx @@ -290,14 +290,29 @@ characters."_ ### Optional versus required fields -All fields in a form are assumed required, with optional fields being tagged as -so. It is recommended that an instruction precedes the form stating either "All -fields are required" or "All fields are required unless marked optional". +When designing your form, consider the purpose and the use case, and note if the majority of the fields are **required** or **optional**.  + +- If the majority of the fields are required, mark **only** the optional fields with (optional).  +- If the majority of the fields are optional, mark **only** the required fields  with (required).  + +Using the appropriate pattern based on the use case will reduce visual noise and clutter; helping your users to more quickly and accurately complete the form. It will also ensure consistency through and across products.  + +If you choose to mark only optional form fields, it is recommended that an instruction precedes the form stating either “All fields are required” or “All fields are required unless marked optional”.  + + + + +![Example of a short user sign-up form using the Optional pattern](https://user-images.githubusercontent.com/48838320/131397684-0882cf1e-90b8-4029-ac26-bc111329f323.png) +Example of a short user sign-up form using the Optional pattern + + + -![optional fields in a form](images/form-usage-5.png) +![Example of product configuration properties using the Required pattern](https://user-images.githubusercontent.com/48838320/131397758-015ea0ea-e3ba-4a67-947b-e4215235e2b5.png) +Example of product configuration properties using the Required pattern