47

I am designing a web page which give admin users the opportunity to manage the users below them. in one section of this admin page, the admin user is required to fill out how many queries he permits to each user below him to run in this system (i.e. queries limit).

This input looks like this:

enter image description here

The admin can enter a number in this box, increase it or decrease it.

The problem is: the admin should have an option to permit the user to run an infinity queries, i.e. not limit the number of queries he can run.

It should look something like this:

enter image description here

How can I manage allow the users to enter an infinity number, in an efficient and clean way?

11
  • 29
    Maybe I'm quibbling (don't know if it's my math background, or English?), but your users can't enter an infinite number of queries. They have the option of entering an unlimited number. And as others point out in answers, if you frame the question that way, the solution becomes obvious: a "limit/unlimit" checkbox, and a number entry field that appears when "limit" is selected.
    – jamesqf
    Commented Aug 5, 2017 at 16:48
  • 2
    How high can the number of queries go? e.g. 10, 100, 1000? Having a + / - suggests that making adjustments by one makes sense, which would suggest that only very low numbers for the limit of queries makes sense
    – icc97
    Commented Aug 6, 2017 at 8:07
  • 21
    That's simple: users should be able to enter infinity by pressing + infinite number of times. Commented Aug 6, 2017 at 12:45
  • 1
    @el.pescado: Won't work. On a 32-bit machine, you only get to 4294967295 queries (assuming unsigned int type) before it wraps. 64 bits gets you a bit more, but still will wrap around eventually. Maybe the OP could wait until Intel releases their forthcoming "Hilbert Hotel" infinite word length processor :-)
    – jamesqf
    Commented Aug 7, 2017 at 6:09
  • 5
    You should use the word "unlimited" rather than "infinity" on the screen, by the way.
    – Mr Lister
    Commented Aug 7, 2017 at 7:25

8 Answers 8

81

Add a checkbox labelled 'Limit number of queries'.

And only make the input field active if this checkbox is checked.


Alternatively if you must use the infinity icon, keep it simple and place it to the right of the '+' button, in the same style.

Infinity button

This would also adhere to the perception of hierarchy.

i.e. the left button decreases the value, and the right button increases the value, so a button even further right should increase the value even more.

It's also worth disabling the infinity button if the value is already infinity, to make the user aware of the allowable (or disallowable) operations.

19
  • 12
    Both are good answers, but I would use the alternate suggestion. Check the check box by default if that is what most users will be doing. Then uncheck it automatically when a number is entered, or if + is pressed, and then if - is clicked when the number is 1, then auto check it again.
    – Anders
    Commented Aug 4, 2017 at 11:47
  • 50
    What happens if I press the - button when the current state is "infinity"? How many is "infinity minus one" ? The advantage of a "limit number of queries" checkbox is that it enables/disables the limit setting, but a disabled setting can still be shown greyed out and remember a previous value.
    – MSalters
    Commented Aug 4, 2017 at 12:34
  • 1
    You would have the minus button disabled in this case. But agreed my second suggestion is more suitable in this situation.
    – user101673
    Commented Aug 4, 2017 at 12:38
  • 9
    I don't have a source for this, but I think the commonly accepted approach would be for either of - or + to merely restore what value was present before clicking infinity.
    – SimonT
    Commented Aug 5, 2017 at 7:30
  • 8
    You aren't allowing an infinite number users; you are allowing an arbitrary number of users. Don't mix the two concepts.
    – chepner
    Commented Aug 5, 2017 at 16:40
108

How about using something like this?

enter image description here

6
  • 35
    I agree with this; don't do an "infinity" button. Also, you should hide number input unless they check the box. Without the box being checked; the number input is irrelevant. Commented Aug 4, 2017 at 19:04
  • This is also much easier to implement in the backend. How does the infinity respond when you click +/-? Do you then have to put in a special condition to read the infinity symbol? How are you passing the "infinite" value to the back end? -1? Just do the check box.
    – Nelson
    Commented Aug 4, 2017 at 19:29
  • I think it could also be useful for an infinity symbol to appear in the number input box if "limit number of queries" is selected and the +/- buttons could become greyed out. Personally, I would like this numeric cue to instantly give me feedback about what checking this box actually does, or at least confirm that it does what I expect.
    – syntonicC
    Commented Aug 5, 2017 at 14:16
  • @syntonicC you mean the opposite, right?
    – Pedro A
    Commented Aug 5, 2017 at 14:47
  • 5
    The number field and the +/- buttons should be greyed out unless "Limit number of queries" is checked.
    – Stevoisiak
    Commented Aug 6, 2017 at 2:56
12

This seems very close to a very common pattern for pagination by limiting searches per page, e.g. datatables:

enter image description here

In your case you only want to display the first page, but it's still pretty much the same concept.

  1. Then instead of 'infinity' seeing as you're talking about limits, 'unlimited' or 'none' would do.
  2. This gets rid of all the complexity around @MSalter's question "what's infinity - 1?".
  3. You keep it as one input

Edit: As other's have commented, this would work well as radio buttons:

enter image description here

Edit: From @FKEinternet's comment there is indeed an example of this in the Windows power options:

enter image description here

and further to that, in the advanced options, they use '0' as an infinity placeholder which gets replaced with 'Never':

enter image description here

Edit: I'm assuming here that users will have a relatively small set of options for the query limits. If every single user can potentially have a different limit, then a number input makes more sense. However if there is a common set of limits, then you have the benefit here that you combine the two inputs into one.

11
  • 18
    Man, how I hate combo boxes foir numeric entry... Commented Aug 6, 2017 at 12:39
  • 1
    click the combobox and type the number
    – icc97
    Commented Aug 6, 2017 at 15:18
  • 1
    Yes, assuming these are manually entered queries (not run by a script), all you probably need are options like 5, 20, 100, and unlimited. I doubt it needs to be more finely adjustable. Maybe even go with radio buttons. This makes for one or two click entry for any value including “infinity,” which is probably more efficient than the OP's design. It also cues the user on what are reasonable values to enter, saving the user some thinking time. Commented Aug 7, 2017 at 12:32
  • 1
    Good answer, there really seems to be no go reason to allow users to have 37 or 413 queries. A limited number of round figures and one "unlimited" option should be good enough for everyone. Giving users more options that they would ever need only adds friction, and is a nuisance best avoided.
    – Masked Man
    Commented Aug 9, 2017 at 7:50
  • 2
    @MaskedMan Just because you can't see a reason why an arbitrary number shouldn't be allowed doesn't mean there isn't a good reason. I frequently find that "a limited number of round figures" prevents me from making the selection I want (most recent example, "leave drives on" settings in winDoze power manager) which adds friction and is "a nuisance best avoided" - if there isn't a specific, legitimate reason for limiting users' options to a small range of values, you should not restrict their options. Commented Aug 9, 2017 at 9:03
10

In scenarios where a setting of zero does not make sense, zero is sometimes used for infinity. It does not really make sense but I think I've seen it in more than one application so as a user I'd see it as reasonable behavior. Of course it's important to add a label like "0 for no limit". The upside to this approach is that it uses a standard UI component and needs no conditional logic for hiding the control.

9
  • 4
    Or "0" could mean => no queries for you.
    – Fernando
    Commented Aug 4, 2017 at 21:47
  • 1
    @Fernando That obviously wouldn't be a setting where zero doesn't make sense. I've seen this in many applications.
    – Barmar
    Commented Aug 4, 2017 at 22:38
  • 4
    Using 0 to represent something other than 0 is an implementation detail that shouldn't be exposed to the user in a good interface.
    – chepner
    Commented Aug 5, 2017 at 16:23
  • 5
    Having 0 or -1 as a 'special' value might be common, imho its a hack and shouldn't be encouraged. It's not intuitive & requires explanation to the user. Needs different handling for values without option (0 or negatives are valid choices) resulting in mixed paradigms. Code uses signed datatypes when an unsigned one would be best. Those numbers are special because the code uses them specially. Also a hack best avoided since it can lead to bugs when code forgets to consider the 'special' state. Just have a proper flag variable. Commented Aug 6, 2017 at 3:18
  • 2
    0 = no-limit is common in config files, but less common in end-user UIs, I think. If only admins can set limit=0, then this design choice may still make sense. Commented Aug 7, 2017 at 4:19
10

Given the OP's wording of his question, I would implement Joel Tebbett's first suggestion this way:

unlimited checkbox

This would adhere to the perception of heirarchy as noted in his second option.

2

While possibly not the best suggestion i have seen many interfaces that address this constraint by allowing a -1 input with a meaning of (unlimited)

See references to software using this "https://www.google.com/search?q=%22enter+-1+for+unlimited%22"

1

Just accept empty inputs.

A limit of infity is the same as no limit. If the input is properly labeled, leaving a field labeled as "limit" blank really says, that there should be no limit.

Depending on the background of the users and the importance of people knowing that infinity is an option, this can be made obvious to all people by placing a small hint like "leave blank for no limit" next to the input.

1

It's important to remember that not everybody understands what "infinity" is, or what the infinity symbol means. This is another reason to go with some variation of limit (unlimited, no limit, etc.) rather than using an infinity symbol.

I recommend designing an interface that sets a reasonable default based on the most common use case for administrators.

If the most common use case is that users have no query limits, but when they do it is specific:

enter image description here

If the most common use case is that users have no query limits, but when they do it is unspecific:

enter image description here

If the most common use case is that users have query limits, but the number needs to be specific:

enter image description here

If the most common use case is that users have query limits, but the exact number is not important:

enter image description here

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.