How can I make complicated form logic more intuitive?
I'm building a search feature that allows users to find people based on providing a combination of their full name and SSN. The part of the business requirements that I am struggling with is this:
- If no name is provided, the entire SSN is required.
- When the LAST NAME is provided, you can enter the full SSN or only the last 4 digits - either way the SSN becomes optional.
- Providing any other combination that isn't the full SSN or last four digits of the SSN is considered an invalid entry.
How can I present this logic in an intuitive way? I'd like to display this logic visually through the use of a clever layout, making it so that the user would follow these rules automatically. I do not want to rely on including text that the user will likely not read.
My thoughts are this: Maybe present the form as two options: name or SSN search. When a Last Name is entered, grey out the first two fields for an SSN. When an SSN is entered, grey out the Name fields.
However, I'm still curious as to what could be the most elegant solution. Is there somewhere that this fails? Is it unintuitive?