[SOLVED] Search in module position

winchester

Member
Hi,

I would like to place a search field and a dropdown feild in a module position on the home page. I figure that since there are only 2 modules for Fabrik and none are for search/filtering, if it is possible, I will have to build it as a separate list/form and then use the from module. This search/dropdown should take the use to the main list's page, showing the results from the search.

My question is, how do I get this new list/form to search/filter the main list/form?

fabrik-home-page-search.jpg

Any help will be appreciated. Thanks.

Winchester
 
Somehow this isn't working. It seems something has changed with the processing in Fabrik since this tutorial was written.

I followed the instructions, but it seems that it doesn't have a step to attach the DB table where the form will be searching. Since db is connected to the List and not necessarily directly to the form (at least I don't know of this), it can't seem to find anything.

Should I go ahead and create a list for the search form and attach it to the table to be searched?
 
Did you set up a redirect form plugin with the jump URL being the list you're searching/filtering?
 
Just double-checking: did you follow all to-do's also regarding elements (copy to the right form group etc) as per Wiki page?
 
Just double-checking: did you follow all to-do's also regarding elements (copy to the right form group etc) as per Wiki page?

I did follow all. The only step I had an issue with was trashing the "id" - it wouldn't allow me to trash or unpublish it.

The only thing I wasn't sure about otherwise was the Jump URL. Why didn't they just make the plugin configuration idiot-proof for idiots like me? Most users just want it to work as basic and normal as it could come. *sigh*.

Do you think it has something to do with pre-filters?
 
... The only step I had an issue with was trashing the "id" - it wouldn't allow me to trash or unpublish it.
Sorry, but this sounds more like you're not dealing with copies/children (as per Wiki) but originals/parents...

The only thing I wasn't sure about otherwise was the Jump URL. Why didn't they just make the plugin configuration idiot-proof for idiots like me? Most users just want it to work as basic and normal as it could come. *sigh*.
It's a generic redirect plugin, not only for use with a search form. So, it can be used for many purposes... in a different situation I use it e.g. to redirect to a preview after form submission.

Do you think it has something to do with pre-filters?
No. Only, more is hard to say from far away.
You said, "it can't seem to find anything", but that's not much to work with. What exactly is happening after you submit the search form?
And if you call www.yourdomain.xyz/index.php?option=com_fabrik&view=list&listid=15 directly in your browser, does the page exist and load the list as can be expected?
 
Ok.. Trashed what I had before and I'm not going back through the process again. I just wanted to be sure I'm correct on this part.

In this section:

Code:
• In "Elements" filter for your searchform group
    • Edit (unlink) and adapt all elements
        • you can unpublish or trash id and date_time (and empty trash)
        • for all elements you want to use: make sure they are visible to the user and/or have correct default values
        • check validations (e.g. "isunique value" doesn't make sense and will throw a MySQL error)

Does "Edit (unlink) and adapt all elements" means to unlink the elements from their parent elements? See image below. I'm not going to "unlink" them, I'm going to skip this section and move on.

Also, see the warning message when I tried to unpublish the "id", even with the elements still linked to their parent elements.

fabrik-home-page-search-03.jpg

fabrik-home-page-search-04.jpg
 
Last edited:
ok.. Re-did it and the same thing, even with the linked elements.

I'm not sure if it's just with this form. The filter on the list is not working properly either. It does filter, but it repeats the first row and never shows any of the others.. I'm gong to take a break and then look at it again later. *sigh*
 
I got it rid of the conflicting javascript, finally, and now the filter/search on the list page works great. However, I'm still having an issue with the search on the home page.

What I'd like to know now is if it is possible to have only one field for searching the data of 2 to 3 different elements.

Basically, I have 4 elements that I would like to have in the search.
  • Beach name - textbox element - The name of the beach.
  • Other names - textarea element - Other names that the beach may also be called.
  • Town - textbox element - The town the beach is in or closest to.
  • Parish - dropdown element - The parish where the beach is located.
I would like a search field that will search through the data for "beach name", "other names" and 'town" and to use a dropdown field to filter the parishes.

Right now, I have 2 search fields, "Beach name" and "Town" (disabled the "other names" field for now) and the dropdown for "parish". The problem is that the beach name field only looks up data in the "beach name" element and the "town" only looks into the "town" element's data. Another, even bigger issue is that when you click on the search button, the result page shows no results. It only shows the search/filter which is on the list page. However, if you do the search again on the empty result page using the list page filter/search, they work like they's supposed to.

I already followed the instructions from the Create a search form page in Fabrik Wiki, twice and got the same thing. Is there another tutorial with another method that I can try?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top