• Resolved squinx

    (@squinx)


    Hi there,

    I am sure there is an easy fix for this , but I noticed after the last PDatabase update that our search fields changed [search=”true”] and i am unable to define how a user searches. Now ALL the fields show that I have defined in the columns vs the ones that I have checked as “sortable” in the database field manager.

    I have also tried [search_fields=”city, state”]

    Searching extensively on the web, it seems that there was an update and and surely I do not need a custom template anymore. Thanks for leading me in the right direction!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    I’m not exactly sure how that got broken for you, but I think I can help you get your search function working the way you want.

    The default way the search field selector works is to show all the fields that are visible in the list display. The “sortable” checkbox only affects which fields are available as sorting fields if you are using the sort control.

    If you want to customize which fields are shown in the search field selector, you are correct about using the “search_fields” attribute in the shortcode. For example:

    [pdb_list search=true search_fields=”city,state”]

    If you were using a custom template in order to customize the search fields, I suggest you try it without the custom template, like in the example above.

    Thread Starter squinx

    (@squinx)

    Hi Roland, thanks for your reply. No custom template used. Added [pdb_list search=true search_fields=”city,state”] (but had to change the curly quotes) and works just as I want it to, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘define search fields’ is closed to new replies.