10

I have a form in which there are many fields around 11-13(average not constant). Now some fields are required while others are not. My client intends to hide all non-required ones and show only required ones.What is the best way to hide/show non-required fields.

1

4 Answers 4

8

Do an accordion or sliding panels. Expand the mandatory fields section by default and close the optional fields panel by default. This way user always sees the mandatory fields open and if they want to look at other fields, all are a click away. https://jqueryui.com/accordion/#collapsible

enter image description here

2
  • 2
    What if I don't put mandatory fields in accordion and simply make accordion for optional fields? This should be better UX ,what do you say? Dec 29, 2015 at 8:15
  • Sure you can do that. But its not an accordion any more. Just a single sliding panel. Only advantage I see is if you have way too many fields in each of the sections, it will help visibility/manageability if you have two sections collapsible. If you are working with not so many fields, then you could do just one collapsible.
    – PK2016
    Dec 29, 2015 at 15:57
6

You could present the mandatory fields first and then on a second page show the optional ones with a clear way to skip filling them out.

This is a technique called progressive disclosure and might be a good alternative depending on the context. enter image description here

2

I don't know the nature of the entities you are dealing with, but if client is insisting on this then

1) Show a checkbox at the top of the form labeled - Show only mandatory fields. On selecting this checkbox, non-mandatory fields should be hidden

2) Or, you can a checkbox with label - Fast fill.On selecting this checkbox, non-mandatory fields should be hidden

You can remember user's preference if he use this form again so that he/she doesn't have to make select this checkbox again.

However, do sensitize the client that they will run the risk of totally forgetting about non-mandatory fields. So you need to remind the user about the completion status of these forms if the need be.

1

The best way would be different in different cases So, you can take a look at some literature or good examples on Progressive disclosure (the term for this) to determine what suits you best.

Also, the way you hide and disclose would depend on a lot of things like

  1. The screen ( web, mobile etc.)

  2. Content length

  3. Relation between the content

  4. Hierarchy

  5. Visual appeal etc.

Your Answer

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

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