0

I've a web application that requires some fields to be updated automatically based on user inputs to related fields.

Ex:
If user inputs value in TextField 1, they might expect TextField 2, 3, and 4 to be computed and populated.

The challenge is computing them might be intensive and the calculations are on server side. We are choosing to not automatically populate the related fields instead compute it only if user explicitly requests it.

Current thoughts are:

  1. Have a small button next to every computable text field to allow user to request that field to be computed with existing values. So when they press only text field 2 will be computed.
  2. Have universal button to populate all fields that can be computed.
  3. Have both option 1 and 2.

Is there are an existing pattern or design recommendation for this problem? Or the above is a good choice?

2 Answers 2

0

I would lean towards option 2 for sure. Having a compute next to each field sounds redundant if option 2 calculates everything it can.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented Feb 4 at 14:53
0

Several questions here. In your scenario can the user actually interact with fields 2, 3, and 4 manually, or are they ONLY calculated and populated by the system? This only really matters in understanding the complexity of the system, but if all fields are user-interactible and they affect each others' content it seems complex enough that a single button to calculate things across fields makes the most sense.

The other related questions are: how many user-input fields are there in the overall form vs. how many that are just calculated output, and how complex are the relationships between ALL of the fields?

If there are only a small number of fields that the user can actually interact with, depending on your layout and how the fields interact it might be fine to have a small "Calculate" button next to the interactible fields. But if there are multiple fields that take user input this might get cluttered and confusing and a single Calculate button is probably a better opton.

However, particularly if the user only enters info into a few fields and the others are all just read-only calculations, you might consider updating those calculated fields upon field-blur rather than making the user take an explicit action.

You might even consider calculating things AS the user types, as long as you provide an appropriate debounce-time for keystrokes... you probably don't want to ping the system and recalculate after every keystroke, but if the user types something and then waits for 500-1000ms, perhaps send the request to the server and have the calculations be made to populate those fields.

All of this, of course, depends on how strongly the server request and computation affects the performance of the page. If those computations and the round-trip requests take a significant amount of time, doing it based on keystrokes is not a good idea. Field blur could still be fine, but in this situation I'd go with your Option 2 of having a single button to calculate all of the entered fields at once.

This is all "actual mileage may vary" input, of course, without knowing more about your context and form; if you'd like to add some detail to your question we might be able to provide more insightful answers.

Good luck!

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.