jquery mobile selectmenu-custom-filter special characters - jquery-mobile

I am testing a jquery mobile filterable costum select in my project http://www.promocaototal.pt/cidades1.php it's all working fine but the issue is that the cities names are in Portuguese and when applying the filter it does not recognize the special charactes returning an empty search for names like Águeda when typing Agueda. Can anyone one point me in the right direction please?
Thanks

The easiest way is to append data-filtertext="Agueda" to the Águeda option.

Related

How to add country flags icon in front of ion-select-option?

I'm creating Ionic 4 plus Angular app, in that i'm using ion-select dropdown for country.now i want to add country flags icons in front of country name.below code shows what i'm try.
<ion-select class="dropdownselection" placeholder="PROVINCIA" interface="popover">
<ion-select-option value="A Coruña">
<ion-icon src="/assets/icons/man.svg"></ion-icon> A Coruña
</ion-select-option>
<ion-select-option value="Álava">Álava</ion-select-option>
<ion-select-option value="Albacete">Albacete</ion-select-option>
<ion-select-option value="red">D</ion-select-option>
</ion-select>
I know in Ionic 3 there wasn't a a reliable way to add icons. I'm not sure about Ionic 4, but I use this plugin and its great.
Here is an example.
Another huge benefit of this plugin is you can search tons of data asynchronously.
Old, but if someone's needing, you can use country flag emoji's unicode (you can find a list here).
Make sure you're using UTF-8 as meta charset.
Then, copy/paste the emoji in, by example, an object (between quotes) :
Finally, use the property in your template {{ myObject.flagIcon }}.
Example from my app :

ios/xcode/coredata: How to mimic ajax call in objective c

For a tag system, when entering a new item, I'd like the user to start typing a letter or two and see possible tags...similar to how SO tags work on the website i.e. Ajax.
Is there a way to do this on IOS?
Basically the Add Item screen has some empty text fields where you put the name etc.
I'd like to have an additional empty field where as you enter letters you see possible tags appear below and can then select one to tag the item.
The tags would be served from an entity or table so there would have to be a call to core data to supply them based on the letters typed.
Do I have to implement a full blown tableview to do this? Or is there a way to make the possible tags show up below the textfield box.
Thanks for any suggestions.
You could try a third party development in order to make what you want. In a recent project I have used this one:
https://github.com/EddyBorja/MLPAutoCompleteTextField

How to force a user to select values only from autocomplete popup

I am using jquery UI autocomplete for zipcode text field.I want to force user to select only zipcode that are coming in autocomplete options.
Before Asking this questions I have searched a lot on above question But I didnt get any solution for my scenario.
Actually I am using Ajax call to get json response from www.geonames.org site
which has responses with zipcode ,state ,city & some other values.
My problem is that I am unable to implement functionality which will force user to select values only from autocomplete.
How to do it any hints and answer are helpful for me
You might want to think of the UX implications of using an autocomplete to restrict a user's input on a field. More often than not, these types of controls are used to help suggest possibilities, not restrict. Think of goggle suggest as an example.
However, to answer the question. You could check the value of the input against the returned results from the autocomplete on blur to make sure that it matches at least one of them. I found a working example of this here.
The other popular way to do it is to populate a hidden form element that is only populated by the autocomplete result event:
https://stackoverflow.com/a/2585868/159341

Primefaces p:autocomplete component doesnot works under dialog box

I am using primefaces p:autocomplete component (primefaces version 3.0), its working fine , but I am getting 2 issues with it.
First is when I am puuting p:autocomplete component inside dialog box ,and if a user gets suggestions after some typing keywords, it stuckes, neither we can type anymore nor we can use backspace .
Second is p:autocomplete component suggestions are case sensitive.But user should get always suggestions whether he didnt used capital letters.
As a e.g: if a name is stored in database as "John" with capital letter, but if a user type 'jo' with small case letter he should get suggestion as a "John".
How can I solve it?
I don't have a specific answer for your first part. Possibly a PF bug. Is it just the autocomplete that sticks? Does the whole browser hang? Are you able to use other controls on the page?
As for the case sensitivity, you would control that in your autocomplete method on the backing bean. If you want to ignore case, use .toLowerCase(), .toUpperCase(), .equalsIgnoreCase() in your compare.

auto_complete_for: prevent the first item from being auto-selected

The auto_complete_for dealio from script.aculo.us is great an all, but is there a way for me to selectively disable the fact that it always auto-selects the first item in the list?
The problem is that, if I want to type my own entry that is new, and novel, I don't want the first item in the list to be auto-selected. The reason is because when I TAB out of the field, it selects, and fills the text box with that first item.
I got around that, somewhat, by making the first item in the list the same as what I'm typing, but that's not perfect either, because the auto_complete list doesn't always update with every keystroke, depending on how fast I type. I've tried setting the list refresh rate to the lowest value (1 millisecond) but no go.
What I really want is an option in "auto_complete_for" that doesn't select that first item at all - the same way that Google Instant doesn't automatically select the first suggested search phrase - you have to arrow-down to select one.
Maybe I can do this via an HTML option that I'm missing?
Looking at the source, there doesn't appear to be an option for that, but I bet if you changed line 284 of controls.js to this.index = -1; it would do what you want.
Otherwise, it might be time to look for a different autocomplete widget.
If your requirements are too far away from the available plugin, then I guess there is no point in tinkering around. Its best to write your own JS code.
You might want to consider this: https://github.com/laktek/jQuery-Smart-Auto-Complete
or this : https://github.com/reinh/jquery-autocomplete
I'll add another alternative that works great with Rails 3:
http://github.com/crowdint/rails3-jquery-autocomplete
I recently implemented auto complete for more than a field for Rails 2.0.2.
The plugin I used is:- https://github.com/david-kerins/auto_complete . Not sure if it supports Rails 3.
I have also encountered issues on implementing the above scenario and have posted questions( Implementing auto complete for more than one field in Rails ; Implementing a OnClick kind of functionality and formatting wrt Rails Partial-Views ) on stackoverflow for the same, I have been lucky on getting things working for me based on my requirement.
Kindly refer to these questions, they might have relevance to your requirement.

Resources