1

I have a requirement in a project that I feel is a bad idea.

We have a form with the usual fields, name, address, email phone number, etc. My requirement is to make email required based on the state field. For example, if state is New Jersey, then email should be required.

I feel in my bones that it is wrong to set a field to required as a form is being filled out. It seems wrong, but I can't find anything online that shows that this violates some kind of standard or design principle.

My idea is to hide the section of the form containing email and when the state field changes, show the section, and if the state is New Jersey, make the email field required. By hiding the section at the beginning the user has no idea the email field exists much less if it is required. Then when the section is shown, the email field will be required or not, but the user doesn't have any preconceived notion that is being changed. I feel this is a better solution.

My question is, is it wrong to dynamically set a field to required? If so, is my solution better/good?

Any feedback would be appreciated.

  • It is quite strange indeed to require email only for the state of New Jersey for example. Usually, this kind of behavior happens for example, when you select country=US, then the state field appears and it is required. Your way of solving it seems correct to me. – Dimitra Miha May 9 '17 at 14:04
  • Welcome to UX.SE Jim! Good on you to feel like it's not a good experience, but as you've experienced, you're trying to find proof as to why it's not. I suggest you try doing a user testing session with either your users, or people in your office who are not connect to this project. See how they react then use that as proof that this sort of interaction is goofy. Or you might be surprised that it's not goofy at all. Trust your users! Good luck! – Majo0od May 9 '17 at 15:26
  • A conditionally-required email address feels odd, but conditionally-required fields in general are not uncommon. Many paper-forms have things like "3. Does xyz apply? If not, go to question 5" and where question 4 must be filled-in if it does apply. Computerising such workflows pretty much necessitates such dependencies on earlier answers. – TripeHound Jun 9 '17 at 15:21
1

Just wondering if it is an acceptable compromise to show the email field and then provide some helper text to show that it is required only if the state selected is New Jersey.

The alternative could be to make the selection of the state very early on, so that you can already have the email field marked with required once that state has been selected, so it won't seem to the user that you have make the email field required based on the selection of the state. I have seen this strategy applied on websites where they ask you a question first before presenting you with the form, and I assume it is also to deal with this type of requirement.

But definitely good to test the behaviour since it is slightly unusual.

  • more o less what I was going to suggest, so no need to add anything – Devin Jun 9 '17 at 3:50
0
  1. I would suggest having the email field after the state field, and toggling the required on the email field. Since it's further down the page, the user shouldn't under normal circumstances worry about it's current status until they reach it. Where as having the email first, then the state, will cause them to backtrack making it feel painful.

If this isn't feasible, because you want to validate emails early on, to prevent users creating duplicate accounts.

  1. If you can sync the contents between them, you could have email as an earlier step, and later in the form, if they select new jersey, display a second email field if the first was empty, that's required. This way they don't need to backtrack, and you could even display a message explaining why email is required for new jersey users.
  • Having two email fields will immediately raise the question what their difference is. – virtualnobi May 10 '17 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.