Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: "Other" #22

Open
Frank-Marion opened this issue Jan 16, 2018 · 3 comments
Open

Feature Request: "Other" #22

Frank-Marion opened this issue Jan 16, 2018 · 3 comments

Comments

@Frank-Marion
Copy link
Contributor

Frank-Marion commented Jan 16, 2018

I don't yet have quite have the skills to add this. City lists can be incomplete, or perhaps have misspellings. It would be useful to have an "other" option that permits the user to enter something not in the select menu.

PS: Thanks for creating this plugin. Saves me a lot of (remaining) hair pulling.

@Mantish
Copy link
Member

Mantish commented Jan 17, 2018

My guess is that it shouldn't be too difficult, as select2 support something like this: https://select2.org/tagging
@Frank-Marion Would you like to try implementing it?

@Frank-Marion
Copy link
Contributor Author

No, this one is currently beyond my knowledge and abilities, I think. Otherwise, I would have addressed it myself.

@tsbohc
Copy link

tsbohc commented May 15, 2024

I won't submit a PR, but will leave this here in case it helps someone.

All you need is to add tags: true here:

var select2_args = $.extend({
placeholderOption: 'first',
width: '100%'
}, getEnhancedSelectFormatString() );

Like so (note the comma on the previous line):

        var select2_args = $.extend({
          placeholderOption: 'first',
          width: '100%',
          tags: true
        }, getEnhancedSelectFormatString() );

And don't forget to clear your js cache and hard refresh the page (Ctrl+Shift+R).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants