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.

Search Module with Custom Fields

July 26, 2010 12:46pm

Subscribe [4]
  • #1 / Jul 26, 2010 12:46pm

    Liam Spencer

    37 posts

    Hi, it’s me again!

    My client requires that I allow a user to search for specific weblog entries that have a custom FF Radio Group field checked. For example, I have a “profile” weblog, and I would only like profiles with the “winner”, “longlisted”, and “shortlisted” radio buttons selected to be shown in the results. Is this at all possible? I’ve had a look at the documentation and I can’t see any way of doing this unless I have blatently missed it.

    Thanks in advance for your support, as always.


    Liam

  • #2 / Jul 26, 2010 5:23pm

    Bluebloc

    111 posts

    You could try using Solspace’s Super Search

  • #3 / Jul 27, 2010 2:57am

    John Henry Donovan

    12339 posts

    Liam,

    Are you using a third-party custom field for the radio buttons?

    You could use a conditional in your search results. Add the name of yoru own custom field. May need more work if you are using a third party custom field.

    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    
    {if my_radio_button_field == "winner" OR my_radio_button_field == "longlisted" OR my_radio_button_field == "shortlisted"}
    
    <a href="http://{auto_path}">{title}</a>
    {excerpt}
    
    {/if}
    
    {/exp:search:search_results}
  • #4 / Jul 27, 2010 6:26am

    Liam Spencer

    37 posts

    Hi John,

    Sorry, this is a lot more complicated than my post has let on. I will give you a more thorough idea of what I am looking to do. I have a profile weblog that contains all the users details.

    These users can submit application forms with the use of a SAEF, which will be stored in the applications weblog. Inside this applications weblog, I have a relationship field which assigns a profile to an application.

    It is inside the application where the radio buttons are contained (an example, a judge views an application for Joe Bloggs and sets this application to “longlisted”).

    What I essentially need to do is filter out all the profiles that have not been set to a number of status’. So if I apply for an application and the judge is yet to view this application, my profile should not appear in the search results. My idea of this is that I would somehow have to intertwine search results with a reverse related entry tag, and as my knowledge of the search module is limited I am at a complete loss if this is even possible.

    Sorry for the inconvenience of my original post. Yesterday was a very long day!

  • #5 / Jul 27, 2010 6:38pm

    Brandon Jones

    5500 posts

    Liam, as this is a How-to question with multiple approaches it’s best suited for the CodeShare Corner. Going ahead and moving over there to get you more input. Thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases