Need guidance on the Autocomplete widget limits

  • rtolmach
    Asked on December 14, 2017 at 10:27 PM

    Hello Jotform

     

    I need guidance on the Autocomplete widget, please.

     

     

    There are some articles about the issue of how many items the autocomplete widget can accommodate, including these:

    ·         https://www.jotform.com/answers/770106-auto-complete-widget-will-not-accept-more-than-1-800-entries

    ·         https://www.jotform.com/answers/792483-Increase-the-limit-of-entries-for-the-Autocomplete-Widget-

     

    This is unclear:

    ·         At least one article suggests a limit to the number of items.

    ·         At least one article suggests a limit to the number of characters.

     

    However, I cannot find a definitive answer on exactly what the limit(s) may be. Further, I do not understand why there is not a little note under the Items field of the Question Properties. It would have taken less time for someone to add that once than it takes customers to search for an answer.

     

    I have a long, alphabetized list of 3,843 colleges for students to choose from. You can see it here: https://docs.google.com/spreadsheets/d/1t8S2Ro0wkKoqD360vRPx6uzjRLl9t6Ou5SsVypsRUPo/edit?usp=sharing

     

    I first tried to make them all options in an autocomplete on this form:

    https://www.jotform.com/build/73474862587169

    Colleges up to and including North Seattle College appear when I start typing them.

     

    However, the next college on the list, North Shore Community College, does not appear. I seem to have hit some kind of limit, but I do not know whether it is based on the number of items, the number of characters (and if so, then are the characters counted with or without the separator pipes)?

     

    The last item to appear is North Seattle College.

    ·         On the list, it is item #2,179

    ·         The cumulative character count up to and including it is:

    o   60,979 if you do not count the separator pipes

    o   63,158 if you do count the separator pipes

     

    So, what is the limit?

     

    Is there a solution?

    One ticket suggested the customer download the form, modify it, and host it on their own server. We do not have that technical expertise. No way.

     

    Or do I need to have TWO autocomplete fields—one for the first half of the alphabet and one for the second half. (Ugh). At least the wall I hit

    2,179 items and 60,979 or 63,158 characters

    is less than half of the total list size

    3,843 items and 110,835 or 114,678 characters.

     

    I created another form with two autocomplete widget fields:

    https://www.jotform.com/build/73475705084158#preview

    and I split the list between them

    ·         A-M (last item is position #2,070)

    ·         N-Z

     

    This seems to work, although it is really clunky, and it does not let us add many more colleges.

     

    So if this is my only easy-tech solution, then the question is how do I make it less clunky?  If a visitor sees the field, then even with a note about splitting the alphabet, they are likey to look for Zebra College in the first field they see. Then they will be annoyed when it does not appear, or they will type it in (and some will type Zebra U., while some type Zebra University, so we will have messy data).

     

    How can I make the form display just one field at a time? For instance, I imagine a pair of radio buttons, so that

    ·         if you click button labeled A-M, then you are shown the A-M autocompete field

    ·         if you click button labeled N-Z, then you are shown the N-Z autocompete field

     


    Do you have another suggestion on how to accomplish this and make it look clear?

    Thanks!
    Robert

  • Elton Support Team Lead
    Replied on December 15, 2017 at 12:40 AM

    We apologize for the confusion.

    I think it is due to the fact that the Text data type on a database can only store up to 65,535 characters. That' probably around 65k bytes.

    I checked the current options in your form and I can confirm that the characters and the size have reached to 65k.

    Need guidance on the Autocomplete widget limits Image 1 Screenshot 40

    You can use this counter https://mothereff.in/byte-counter

    And this is the main reason why the autocomplete options are stripped and retains the highest number it is able to handle. So basically, the limit is around 65k of characters.

    Your solution about using multiple autocomplete and then show them through conditions is a good workaround. 

    Here's how:

    1. Split the options into multiple autocomplete fields

    2. Add a radio button as a trigger point

    Need guidance on the Autocomplete widget limits Image 2 Screenshot 51

    3. Create a condition that shows the autocomplete field based on the radio button selection.

    Need guidance on the Autocomplete widget limits Image 3 Screenshot 62

    Hope this helps. Thanks!

  • rtolmach
    Replied on December 17, 2017 at 10:43 PM
    Thanks! Works great.

    Best
    Robert

    ...