Let's say you have a radio set and depending on your selection, you will conditionally be presented with a text field to enter data.

You enter data for one selection and then pick a new option, but then come back to the option you entered data in.

Is it best practices to have the previously entered user data still there, or have it cleared out?

enter image description here

2 Answers 2


Of course this isn't going to be a universal answer to the question of whether data should persist in fields when options change. Every option selection group will have different criteria that could mean that the data should persist or that the data should be destroyed when the options change.

However, in your case, I would recommend destroying the data on option change. The data you are dealing with appears to be security sensitive. Any way of making the data persist in that field would require recording and storing it in some way - this clearly presents a possible security risk which may be expensive to solve.

If you do decide to make the data persist then, depending on the technical solution you are going to use, you could use multiple fields that are swapped in place according to the option selected. This would mean that you would be able to retain data in any field where it was entered and recall that to the screen when the corresponding option was selected. During form submission you must discard the extra data as the user will be unaware that they are submitting it.

  • AFAICT the SSN example was just an illustration and not central to the question. Also I don't think the scenario is that the user submitted the form in between, he just clicked the radio back and forth.
    – nafg
    Commented May 28, 2018 at 17:40
  • @nafg I'm not sure what your point is - my answer covers all those possibilities including sensitive and non-sensitive data both before and after submission. Commented May 28, 2018 at 17:50

I think you have separate text fields for SSN and FEIN. Otherwise, how Both choice will work? If so, you need not clear SSN text field and you may display it as disabled while returning it to enabled state when select back SSN option.

Also changing text field caption in this case is seemed to be not good idea because it relates to sensitive data, as Andrew Martin said in his answer, and so requires more attention from user what makes mistakes more probable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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