0

In a webapp we have a form composed by a select box and some text inputs.

When choosing item from the select box, some of the text inputs will became disabled because "not applicable" and will not be submitted.

If a user had previously filled a field, how can be managed the fact that changing the select item may cause a filled field will not be submitted?

Text typed should be deleted on select change?

1

Tell him that his changes may affect his previous inputs. You can do this in many ways, for example:

• disable the text fields and add a red text that says "This field will not be submitted with "X" as selected option

This way he is not losing his inputs and can change his decision without retyping everything

• open a modal that says "Selecting this option will delete the field "x", "x" and "x", are you sure you want to do this?

This way the user can think about if he really wants to change it and abort or continue with his option while knowing whats about to happen.

• you can also make those fields disappear when that option is selected and show them again if he switches.

0

Any time you're application is going to do something destructive to a user's previous actions or inputs, you should warn her. And, if possible, the user's other entries should not be destroyed, even if the fields are no longer enabled.

Ideally, though, the warnings should be secondary to the design of the interface. The interactions on the form should make it clear that some options are mutually exclusive. There are plenty of common patterns for doing this, like radio buttons and toggles.

Warnings should be your last ditch effort to keep the user from doing something they'll regret, but they should only be supporting an interface that is designed to keep them on track so they don't get into trouble in the first place.

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.