Title: Search start with a string
Last modified: August 30, 2016

---

# Search start with a string

 *  Resolved [Christine321](https://wordpress.org/support/users/christine321/)
 * (@christine321)
 * [11 years ago](https://wordpress.org/support/topic/search-start-with-a-string/)
 * Hi,
    I use 2 shortcodes in the same page test
 *     ```
       [pdb_search columns="last_name" target_page="test" target_instance=2 ]
   
       [pdb_list fields="last_name,first_name" filter="id=0" orderby="last_name" order="asc"]
       ```
   
 * an I have checked the “Strict User Searching” setting.
 * When I search a string like B, the list contains all the records which contain
   the string B in the last_name field and I’d like to show only the ones which 
   start with B, in fact to do like the search B*. How can I manage?
    I’d like to
   force the length of the search with at least 3 letters, I mean no to allow a 
   search with only B or C … Is it easy to do? Thank you
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408644)
 * You won’t need “strict user searching” for this: a search like “B*” will give
   all the records in the searched field that begin with “B”
 * You can’t set the field to search on in the search shortcode (it’s a good idea,
   but it doesn’t work that way) so the user has to select which column to search
   on.
 * As to requiring the search to be a certain number of characters or more, this
   can be done, but it would require a custom template and a bit of javascript.
 *  Thread Starter [Christine321](https://wordpress.org/support/users/christine321/)
 * (@christine321)
 * [11 years ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408652)
 * Thank you for your answer.
    I understand for the second part of my question (
   a certain number of characters) –> require some development.
 * I’m not sure to be clear for what I need in my first question: I’d like when 
   I submit “B” to have only the records which begin with “B”, in fact to force 
   the search to do a “B*”
    Example: when I search “B” now I have Abbot Ambrose 
   Brigham Buck Bud
 * And I’d like (when I search B) to have
    Brigham Buck Bud
 * I’m sorry for my english, I hope you’ll understand what I need.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408658)
 * Yes, type B* into the search field and you’ll get all matches that begin with
   B
 *  Thread Starter [Christine321](https://wordpress.org/support/users/christine321/)
 * (@christine321)
 * [11 years ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408715)
 * Hi
    I’ve found what I need by changing the operator and delimiters.
 * Example
    Abbot Ambrose Brigham Bruce Buck Bud When I search “Br” I have “No Results”
   as expected When I search “Br*” I have all the results which start with Br et
   not Ambrose When I search “Bruce” I have a strict search.
 * Everything ok for me, you can close the post.
    Thank you
 *  [samluke](https://wordpress.org/support/users/samluke/)
 * (@samluke)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408877)

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

The topic ‘Search start with a string’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [samluke](https://wordpress.org/support/users/samluke/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/search-start-with-a-string/#post-6408877)
 * Status: resolved