2

I have a form with several optional text fields, and a workflow in which a user might reasonably save a partially completed form and return to complete it later.

I want to prevent errors where a user leaves an optional field empty by accident. I want the user to say "I really mean to leave this field empty" before the form is submitted.

For example, one can enter a list of departments (comma-delimited list in a free text field) to enable filtering. I would like a user who sets up a job with no department filter to take an affirmative action, like selecting "No department filter," rather than simply leaving the department text box empty.

Are there established patterns for this kind of thing?

2

Common practice is to use conditional logic.

You can prevent the user being nagged about something they intended by adding a checkbox before the department filter field. The checkbox can say something like "Add a department filter?" and only show the filter if it's selected.

When you do this, you can make the department filter field mandatory, if the checkbox is selected. That way, those who intend to add department filters are nagged and those who don't are not.

If you want to ensure people are nagged if they didn't notice it, just set the checkbox's default value to True so they have to intentionally choose not to use a filter. It's always preferable to let them address such things in the flow rather than show them extra pop-up boxes at submit time.

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.