Make enter select existing or top match - algolia

We've implemented algolia for our search, but now we're trying to figure out how I can trigger "enter" to select the existing match (say you're done typing and it's a match), or the #1 selected choice that comes from the dropdown.
I haven't been able to find any good documentation on this. Does anybody know how to do this?
Example (here I want 0934 to be chosen when you click enter):

I think you're just looking for the autoselect parameter of autocomplete.js.
autoselect – If true, pressing ENTER in the search bar will automatically select the first suggestion.
I guess, based on your question, that you've already handled the selection event afterwards, but in case you didn't, or for others that would stumble upon this question, the next thing to do is to use the autocomplete:selected event to use this selection (e.g. redirect or change something on the page).

Related

Drag and Drop Captivate Question: Need 'Submit' button to work similar to 'Next' button

I am trying to create Adobe Captivate Quiz and have included Drag and Drop Interactive Questions (along with MCQ questions). How to go to the next slide?
I have changed the text of 'Submit' button to 'Next' button. In 'Drag and Drop' Actions, I have selected the following settings:
The question looks like:
The correct answer to this question is 'provide a safe workplace/environment'. When I try to submit a wrong answer or no answer, and click on the 'Next' (Submit) button, the control does not go to the next slide.
I tried to keep these settings:
This setting simply gives me 10 attempts to submit right answer. Without going to the next slide.
What settings should I choose and how do I move to the next slide and ensure that the candidate has the freedom to revisit the question n number of times, until they 'Submit' the entire quiz?
Thanks in advance :)
Drag and Drop slides are Content slides and not Adobe Question Slides and hence, changing the number of attempts will not necessarily help.
Number of attempts simply means the number of attempts to reach the correct solution. This means that they will have say 10 attempts to select the correct answer. However, they not be able to proceed to the next slide unless they get the answer right or they are out of attempts.
The best way to implement such questions will be using dropdown Fill In The Blanks or Sequence questions.
Hope this helps!

MS Access Form Development: Hide Objects when an Option Button is Pressed without coding for each Object that needs to be hidden

MS Access Development Question:
I have 3 options and I need each one associated with a different set of objects. Therefore, if you click option 1, a set of objects will appear in a box I'm referring to as "Report Parameters". If I click option 2, the objects in the "Report Parameters" box will disappear and a new set of objects will appear.
I didn't want to write code to switch each object from visible = true to visible = false. I thought that would take too long, especially if the number of option buttons or the objects related to it grow.
So I'm trying several things...
I tried putting all objects, that relate to a particular option, in a Subform. Therefore, I would have three subforms and that would sit in the same position on my main form. When you click on an option, the subform for that option is made visible any anything else is hidden. But I have a background picture that needs to be visible on the main form and you can't make the subform background transparent.
I used Tab Controls; however, I didn't want to use the tabs to control the switch between objects. I can hide the tabs but you can still switch between them if you click the space where the tab should be. It can be made transparent though so that helps a lot.
I need something in-between a Subform and Tab Control but I've hit a dead end. Does anyone have any other suggestions or recommendations? Or am I stuck coding for each object?
I'm an experienced VBA developer. My last option was to run a query against the form and pull all object names and save it to a table. Since the syntax of the name for each object connects it to a button, I can always run a loop that makes all objects visible/invisible if the object's name corresponds with a specific option... but... I guess I'm trying to find a shortcut. Let me know what you think! Thanks.
I was able to resolve my issue. I just needed to do some thinking... so writing up this question was a bit premature. I'll write down what I did in the event that someone has the same issue I have.
First, I used the Tab Control object to resolve my issue. I made the control transparent and named each page to reflect the Option Button I was selecting.
I then mapped each option to a button in the VBA code of the button. Therefore, when the button is selected it does several things.
First, it makes the default value of any of the other options equal to false. I also set the visibility of their corresponding pages to false.
Second, I select the page I need visible and set the visibility to true. I also make it my active page.
Lastly, as a safety measure, if the option button is already selected, and you select it again, by setting the value of that option to true. This is to prevent it from changing to false. One option should always be selected.
Hope that all made sense!

OBIEE 12c How to skip filter page in prompt

I am trying to create a simple hierarchy in OBI, after adding prompts to the sub analysis. When ever I click on the main analysis, it always shows a filter first and I have to click the okay button to get to the next analysis. Is there any way to remove this? The value can be auto selected, I really don't want to click this okay button manually. Please see screenshots below, I want to remove the second step.
You could hide the dashboard prompt, so it gets applied with default values, or you don't even need a dashboard prompt in this example, using GoUrl functionality the value is passed.

Navigating GWT / GXT components by pressing Enter

I want to know if there is any way to navigate Dialog components by pressing the Enter Key in the same manner natively implemented by the TAB key?
Though I haven't tried it by handling the keyDown and keyUp events certainly it seems doable. Though you may not be able to intercept the browser produced dialog boxes this way and other dialogs created using Window.alert(). How are you creating the dialogs ?
The tab key is the browser doing the work of changing focus - nothing special needs to be added, you'll find that tab works on any form on the internet (except where explicitly disabled for some reason...).
To move focus with the enter key, you must listen for the onkeydown event (focus change via tab also occurs onkeydown, so selecting this for consistency), check if it was the enter key, and if so, move focus to the next element in the list.
Typical tab focus behavior involves the browser checking the tabIndex of the elements on the page, and finding the next element on the page with a higher tabIndex, or the nearest subsequent sibling/cousin element. I don't have a method to implement this easily, so instead I'm going to focus on just going to the next widget.
GXT 3's FormPanelHelper has some handy methods to look for all Fields - this code could be used as a basis for non-GXT fields as well. Track all FocusEvent and BlurEvent from the fields found in the dialog, and use that to always track the currently focused field. Add a key handler to the dialog itself, to capture all key events, and check if one is the enter key. If so, figure out what the next field is from the currently focused field, and invoke .focus() on it - this will trigger the focus handler described above, so your bookkeeping will be updated correctly.
And as #eliran-m noted, consider leaving the tab key alone - don't get in the way of users navigating the way they are used to. Adding new functionality might be a good thing, but taking away expected behavior probably isn't.

Select dropdown list accessibility/usability

I am trying to find the most usable/accessible way to implement a simple form dropdown list which will sort a list of products by pice and alphabetical order.
In your opinion is the dropdown more usable when there is a button that governs its submission or when it automatically submits onchange of the dropdown?
The research I have read is both for and against such methods and there is a variery of implementations on the web so interest to hear the thoughts of the community.
Thanks in advance
As a blind computer user either method works fine. I find that having a button to click is slightly easier for me then the onchange event firing. I wouldn't say it's a big enough difference to take into account though assuming the majority of your users will not be disabled. If your targeting specifically blind users I would not use the onchange event.
So long as you do not change focus or navigate to another page when the selection changes, either approach should work. The classic example of a problem dropdown is where it contains a list of other pages on the site, and navigates as soon as the selection changes. This prevents a keyboard user from using the list; they can't browse it, and can't navigate to any pages beyond the first selection, since it's impossible to navigate past those. So in cases where focus changes or the page navigates as a consequence, having a separate action (eg. Go button, or handling enter) to cause the navigation to take place is essential. This is likely where the advice you've read is coming from.
In this case, however, it sounds as though you are just updating content elsewhere on the page, and not changing focus or doing navigation. Simply resorting existing content should be fine.
Depends on your users and their respective expectations and the context in which it's presented.
As a blanket, general statement, you should have the drop down accompanied by very obvious submission button. That is the safer approach.
If you are refreshing page data or if the focus moves away after the dropdown option is selected, you should use a button to be accessible. If you fire the event on change, blind or keyboard-only users will not be able to use the dropdown menu at all if they are on windows with ie and chrome (so added together, a majority of the people on windows). As soon as they use the arrows to scroll down and make a selection, the first option they hit will be selected and the page data will refresh or the focus will move, making it impossible for them to navigate or select the second option, third option, etc. Below is a thorough explanation with examples so you can see what I mean.
Designers definitely don't like the buttons, but if you are blind and on chrome/ie, it is impossible to use a lot of dropdowns without it. I'm guessing Jared uses firefox or a mac.
http://pauljadam.com/blog/javascript/onchange-event-on-a-select-inputjump-menu-accessibility-problems/