Restrict input entry to the set of key-phrases.

Ross's Avatar

Ross

07 Nov, 2012 01:45 AM

Hey,

First, thanks for the wonderful Autosuggest field. One question though... is it possible to restrict entry only to the set of defined key-phases for Auto-suggest? For example, imagine an input box for Month name... is it possible to put a restriction so the User won't be able to enter anything else outside the set of 12 month names? I know it's kind of Drop-down Select element of HTML, but I want to implement the same functionality with Auto-Suggest. Possible?

Waiting for your reply...

Cheers,

Ross.

  1. 1 Posted by Jon on 07 Nov, 2012 08:24 AM

    Jon's Avatar

    Hi,

    Option A:

    The user can input any character but can only select an item from the suggested ones.
    

    Someone in this forum added a parameter to the autosuggest plugin to obtain that functionality. Just use the attached file and set the parameter noFree to true.

    Option B:

    The user cannot even type 'X' because there is no month with that character.
    

    I think you should use a dropdown select.

  2. 2 Posted by Ross on 07 Nov, 2012 11:11 AM

    Ross's Avatar

    Hi,

    Thanks so much for your quick reply. I will try the attached JS file. The example of months is from one of the two projects and I totally agree with you on using Drop down over there.

    Cheers,

    Ross.


    *P.S.: I liked your "Verify Human Spam protection", reminded me my math teacher in school. :-)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac