PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Numbers in enhanced drop down's search filter

  1. In my first Gravity Form, I have a drop down list of 240 departments and department codes for my university. I did a "bulk add" to get the name|value pairs in there, and I checked "Enable enhanced user interface." When I previewed my form, I noticed that typing letters in the search field for the drop down returned items from the list, but numbers did not.

    For example, some of the departmental listings I added look like the following:
    Business Operations, Princeton Plasma Physics Laboratory (384)
    Butler College (530)
    Capital Giving, Office of Development (874)
    Center for African American Studies (108)
    Center for Economic Policy Studies (355)
    Center for Information Technology Policy (332)

    And a user might not be sure how their department is listed, but do know their 3-digit number and may try to type that number in the field. However, typing "108" does not return any results. Is there a reason why that search field only filters letters?

    Posted 12 years ago on Friday March 9, 2012 | Permalink
  2. Richard Vav
    Administrator

    The enhanced UI is powered by the Chosen javascript plugin, and as far as I can tell the problem is that Chosen isn't searching inside ( ) brackets, you can have text or numbers between those brackets and the search won't find either.

    Until Harvest fix that there's nothing Gravity Forms can do, the only thing I can suggest you do would be to remove the brackets and separate the department name and number using a hyphen which does work, so you would have the following instead

    Business Operations, Princeton Plasma Physics Laboratory - 384
    Butler College - 530
    Capital Giving, Office of Development - 874
    Center for African American Studies - 108
    Center for Economic Policy Studies - 355
    Center for Information Technology Policy - 332

    Posted 12 years ago on Friday March 9, 2012 | Permalink
  3. Richard Vav
    Administrator

    I have done a bit more digging and found a bug report on the Harvest/Chosen github issue tracker
    https://github.com/harvesthq/chosen/issues/206

    Apparently if you add a space before and after your three digit number the search will find it so
    ( test ) and ( 123 ) works
    (test) and (123) doesn't

    Posted 12 years ago on Friday March 9, 2012 | Permalink
  4. Brilliant. Both workarounds work great, and square brackets work too [123].

    Thank you for your help, Richard.

    Posted 12 years ago on Friday March 9, 2012 | Permalink
  5. Richard Vav
    Administrator

    No problem

    Posted 12 years ago on Friday March 9, 2012 | Permalink