All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

am i referencing channel fields correctly

rebecca 2 Jul 2012 22:36 question, complete

hi low-
client wants a set of drop downs to search some collections i've already set up (and successfully use via a keyword search).

but i return no results ... is the field name correct, e.g. name="low_search_search:profile_degree1" where the collections being searched have profile_degree1 as a searchable field...

{exp:low_search:form collection="profiles-manual|profiles-salesforce" site="broad|residency" search_mode="any" result_page="network/search"}


Grad Degree:
{exp:query sql="SELECT field_id_11 from exp_channel_data WHERE site_id='1' AND channel_id ='1' GROUP BY field_id_11
"}
{field_id_11}
{/exp:query}


... 3 more fields similar to above, drop downs ...
{/exp:low_search:form}

i just have the basic search result to see if i get anything, but i keep getting no results. anything obviously doing wrong here? :)

Replies

  1. Low 2 Jul 2012 23:13

    Hi Rebecca,

    If you're using form fields, you can use what you'd use as a parameter as a name="" attribute. So, {exp:channel:entries search:foo="bar"} would translate to <input type="text" name="search:foo" value="bar" />

    You can then reference to the actual value of that input field in a submitted form with {low_search_search:foo} (which would return "bar", sans quotes).

    Does that help?

  2. rebecca 3 Jul 2012 05:17

    hm. yes, i wasn't sure and tried both and not sure why i can't get results. must dig deeper. easier to just search keywords. :)

  3. rebecca 3 Jul 2012 05:17

    thanks :)
    and i'm a knuckle-head - i counted segment_4 for my query string in the results loop - but whoops, i'm in MSM so it was segment_3 and i get results :)

  4. rebecca 4 Jul 2012 03:41

    yikes. it isn't filtering right, i get all results back from my collection. i have 4 fields in there, no matter what i select, i get everything. if i change a drop down field to name="keywords" (instead of name="search:my_field_name") then i can get results. but that's not the desired result; i need all 4 drop downs to work to search against their desired channel field? do you want to look? you have access still - i can remail.

  5. Low 4 Jul 2012 07:51

    Hey Rebecca,

    Yeah, I still have your login data on file. Where can I find the search form with the filters?