• Resolved sujanm

    (@sujanm)


    Hi Roland,

    The when a user enters a serch term and the search term is padded with a space (‘ ‘) character, the results will not match the database entry.
    From a technical perspective this is correct behaviour but the user percieves as incorrect.

    As an example in your demo search on this page: https://xnau.com/work/wordpress-plugins/participants-database/list-participants/ if the user selects ‘City’ as the search field and ‘San Diego’ as the value, a match will be displayed.
    However if user enters ‘San Diego ‘ there will be no matches.

    This issue occurs quite often because the autocorrect/autofill feature on many phone keyboards appends a space (‘ ‘) after inserting the word entered. The result is that if the user uses the autocorrect/autofill to enter the search value, most often they will not find what they are looking for.

    Would it make sense to trim the search value for blanks prior to seeing if there is a match?

    Alternatively, is there a hook which I can intercept what the user has entered so I can do something similar?

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Roland Barker

    (@xnau)

    Thanks for letting me know about this…yes, the search term should have extra spaces trimmed off, we didn’t encounter this in our testing, but it make sense because sometimes there will be a spurious space character.

    Tere are several filters you can use for this if you want, take a look at this page under “List Searching/Filtering”

    Participants Database API

    Thread Starter sujanm

    (@sujanm)

    Thanks Roland! Hopefully this fix is included in a future release but in the interim I can use one of the filters you pointed me to to intercept the search. All the best!

    Thread Starter sujanm

    (@sujanm)

    Hi Roland, I see that you issued out Version 2.3.3 which in the change log indicates that it has fixed this issue. I have tried it out and only seems to partially work. When some fields are blank padded the updated plugin trims blanks, on other fields it does not. It is not obvious to me why some and not others.

    I have two fields, one named’artist’ and one named ‘title’. the updated plugin will trim out blanks on searches using the ‘title’ field but not on the ‘artist’ field. I can provide a link to demonstrate the issue if you need to see it. Both fields are “Text-line”

    Plugin Author Roland Barker

    (@xnau)

    I see the issue, looks like the search term is coming in encoded in some cases, I’ll have to issue an update to deal with that. Thanks for your report, I missed this in my tests.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Space padded Search Values’ is closed to new replies.