I often work on pages containing forms with complex requirements and subforms. The example below has these attributes:
- The default button -- that is, the button that will be "clicked" when the user hits
Enter
-- is indicated by white text / dark blue background button. - Focus is indicated by a light blue halo.
- Required fields are indicated by an orange bar (their related label has an orange star).
- The General List Info fields and the data in the table are the data that is part of the main form and ends up getting saved when Submit is clicked.
- The requirements for the main form are Author and Update Date.
- The contents of the Find Cars for List groupbox is a subform that adds any rows from the database that match the filtering fields into the table. One of the fields must be filled to avoid an error (there's no indication of it before hitting the Add to List button).
- The fields and buttons above the table are another subform that allows the user to set the preferred color for rows or remove them from the list.
- The requirements for the Cars List subform vary based on intended use. To update rows, the first Rows to Affect field and Preferred Color are required. To remove rows, only the first Rows to Affect field is required.
Please ignore any silliness in the content or design other than the way conditionally required fields are shown.
The Core Question:
How do I best front-load the form requirements in cases like this? I want to help users avoid getting errors, but toggling requirements as they change introduces (IMO) confusing behavior. E.g., if the user is tabbing through the Cars List subform, it looks like Preferred Color is required even though the user's intent may be to use the Remove Rows button. Should I simply drop any attempt to show the requirements for complex forms, and just let users click buttons to get error messages?