1

Scenario

There is a list in SharePoint 2013 Foundation for incidents and a list for all rooms, that are selectable for this situation. But since there is too many choices, I would need to filter them out by user input.

For example, I have rooms starting:

  • A101
  • A201
  • B101
  • B201

Now when user Types "A", there should be rooms only starting with A (or containing A, it's not that important). So it wouldn't be too many choices for user to see or choose.

Showing example in use

So there is list for rooms:

enter image description here

Ant there is the list I work with:

enter image description here

Now there is this blue indicator, that is suggesting best or first result for input, that user is typing. But this is not enough, I would need to show only the rooms in choices, that are starting with "B1".

What have I tried

I haven't got to far with this solution. First I tried to get value from user input, but this turned out to be more complicated, than it first seemed. I tried with this JS code

window.setInterval(function(){
    var value = $(':focus').val();
    //var value = $("input[type='text']:focus");
    console.log(value);
}, 5000);

It should work with input elements, but in this situation .val() was not an function and I didn't get too far with it.

When I tried without .val() I got this result:

<input class="cb-textbox " style="height: 25px; width: 101px;" dir="ltr" type="text">

Question

How should I solve this solution, are there any good tools or some good workarounds for this solution?

Also It would be good, if this solution is somewhat universal, since I'd need to use this selection on serval columns in same list.

  • You could add a keyup event to the dropdown, and take it from there – Danny '365CSI' Engelman Jan 20 '17 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.