Forms are the manner in which we gather and validate user input.
Users enter information to manage Azure resources.
Users want to enter information to create, configure and manage resources. Users file support tickets and provide feedback by entering information in the portal.
The portal offers several variations of forms with consistent field layout and form validation to ensure users can easily enter information and understand whether that info is valid. The form variations are dialogs, context panes, full screen blades and wizards. Well designed forms enable users to increase the speed and accuracy of input and lead to successful form completion.
- Dialog: Stopping a VM
- Context pane: Tagging a VM
- Full screen page: Moving a VM to a different resource group
- Full screen page from resource menu: Editing VM diagnostic settings
- Wizard: Creating a VM Free account virtual machine
Choose among these available options when designing experiences for the user to enter information.
- Dialogs are used for very simple input/acknowledgment and appear next to the user click target
- Context panes are used when more space is needed and the input form does not need to invoke any child blades. Context panes appear on the rightside of the screen, vary in width and float over other content.
- Full screen blades are used when the input form needs the space or will invoke a child blade
- Full screen blades from resource menu are used when the input form is invoked directly from the resource's resource menu and serves the purpose of showing the current information and the edit experience for that information
- Wizard is a type of full screen blade with tabs across the top and is used to guide a user as they provide input when creating azure resources
A form can contain:
- Labels and corresponding input fields
- Buttons or another call to action
- Error messaging
- Field and Form validation
As the user enters information, field content is validated. Upon form submission, the entire form is validated.
Include placeholder text can be formatted in two ways:
- As an instruction
- As an example of valid input format
Don’t make users guess field (TextBox) or password (PasswordBox) requirements. Instead, enable field validations for TextBox and PasswordBox in your experience. You can enable the showValidationsAsPopup option to give the user feedback as they type.
- TextBox design-patterns-controls-TextBox.md
- PasswordBox design-patterns-controls-PasswordBox.md
Provide highly visible and specific error messages.
Visit the control guidance to help you in selecting the right control for your page
- Controls guidance design-patterns-controls.md
The buttons for submitting and canceling a form should follow these recommendations. The sections for each type of form follow this list and call out any special casing for that form type. Sometimes a forms blade is invoked from multiple places. For example, the Tag resource
blade is invoked from a resource menu on most Azure resource and also invoked in a context pane from the essentials control. In this case, the Tag resource
blade is designed as a fullscreen blade form opened from a resource menu and does not follow the recommendations of a typical context blade form.
- Buttons are at the bottom of the page in a non-scrollable docked area
- Use a single
Close
button if experience is informational only - Use
Yes
andNo
buttons for destructive actions and include a confirmation question in the dialog - "Delete this VM?" - Use the "action name", like Move, Save, Attach, Add, for the submit button and
Cancel
as the button to close the dialog - Use
Ok
andCancel
as a last resort if a better action name is not apparent
Follow the button recommendations above
- Use buttons at the bottom. Follow button recommendations above
- Don't use a toolbar at the top
- If context pane contains a grid, attach grid actions to the grid with a grid-level toolbar
- Use buttons at the bottom. Follow button recommendations above
- Use a toolbar at the top only if page represents a more fully featured management experience like the Manage alert rules experience (
VM > Alerts > Manage alert rules
)- All buttons go in the toolbar using the naming conventions above
- No
Close
button, the blade has anX
in the upper right corner to close it
- Use a toolbar at the top of the page when the form is opened from a resource menu like the Tags experience (
VM > Tags
) and the VM diagnostic settings experience (VM > Diagnostics settings
) - All actions go in the toolbar using the naming conventions above
- No
Close
button, the blade has anX
in the upper right corner to close it
Create wizard command buttons - see the resource create pattern for details
-
Use inline labels and fields for full screen pages and stacked labels and fields for narrow blades. This behavior is controlled by the Section leftLabelPosition option
-
Mark required fields with a red asterisk * to distinguish them from optional fields
-
Include info balloons (InfoBalloon) if there are input fields that may not be immediately familiar
-
Left align the input fields on the page. Jagged edges are difficult to skim
-
Visually group related labels and fields. Labels should be close to the fields they describe (immediately above the field for context panes or next to the field for long forms). Avoid ambiguous spacing where labels are equidistant from multiple fields.
-
Don't phrase labels as questions. Keep labels short and sweet.
-
Don't include fields that stretch across the full width of the page.
-
Avoid buttons for clearing a form. The risk of accidental deletion outweighs the unlikely need to start over.
- Controls guidance design-patterns-controls.md
- InfoBalloon design-patterns-controls-InfoBalloon.md
- PasswordBox design-patterns-controls-PasswordBox.md
- TextBox design-patterns-controls-TextBox.md
- Section design-patterns-controls-Section.md
- Full screen design-patterns-page-fullscreen.md
- Create a Resource design-patterns-resource-create.md
- Design guidelines top-design.md
Developers can use the following information to get started implementing this pattern
- To show the labels and input field on the same line - include your controls in a Section and set the leftLabelPosition option to true.
- Dialog top-extensions-dialogs.md
- Context Pane top-extensions-context-panes.md
- Forms top-extensions-forms.md
- Forms portalfx-forms.md