ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Field Search: Multiple Exact Searches

October 23, 2012 2:14pm

Subscribe [2]
  • #1 / Oct 23, 2012 2:14pm

    DesignBloke

    63 posts

    I have a custom field group which includes the USPS postal abbreviations and the following regions: national, southern, uppermidwest, lowermidwest, midwest, and flagship.

    I want to do a search like this:

    search:region_customfieldgroup="national|{region_inclusive}|{region}|{assigned_usps_code}"


    The problem is that the above code doesn’t search for an exact match by default. For instance, with “la” that letter combination is found in “flagship”. So, when a page searches for “la” it would also return results assigned to “flagship”.

    The following is not the way to fix this, but I don’t know how to get it done:

    search:region_customfieldgroup="=national|={region_inclusive}|={region}|{lowercase_state_abb}"

    Version: EE 1.6.9 Build: 20100430

  • #2 / Oct 28, 2012 4:51pm

    ahmad saad

    364 posts

    I think u can find it in http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#search-field-name

    so your code will be:

    search:region_customfieldgroup="=national|{region_inclusive}|{region}|{lowercase_state_abb}"
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases