Help with setting up a search form

Status
Not open for further replies.

laztech

New Member
I've created an incident report form.

I wish to have my analysis form pull data from it. Now when I was doing very simple and basic tests, everything seemed to work out fine. However, I deleted the original report form and created a brand new one fully fitted with all elements of the actual form.

I set the jump page in the redirect plugin to the new list view.

I only placed one element into the analysis page, "Search" as a field. No matter what I type into it, all of the data in the list appears, instead of filtering out only what I typed into the field.

What I would like to know is, can I use just one element on analysis in order to search through all of the data in my reports and bring up only what is related to what I type in the field, or do I need a specific element for each element on the report field, seeing as the report itself is VERY long, I'm hoping that's not what I need to do. I am of preference to have minimal search fields that allow for large areas to be covered by them rather than a search field for every element.

The other curious thing that happens is, when I do complete a search, this error keeps popping up:

Notice: Undefined variable: elementModel in /home/johnwi6/public_html/prism/components/com_fabrik/models/listfilter.php on line 795

Attached is an image of the error and results that pop up on the page.
 

Attachments

  • hmmmmerrors.png
    hmmmmerrors.png
    75.3 KB · Views: 359
After further spelunking, I've come to realize you can just copy the list and it will recreate all the internals to it, form, groups, elements. So that solves the difficulty of that situation. However I am still of preference to have a search bar search through an entire list rather than just one element in that list and bring up anything that refers to the searched subject. I just need to know if this is possible, an if so, how to do it at this point.
 
Do you consider the "Search all" option in list settings?
Enable "Search all" and set "include in search all" for any element which should be searched.
 
Do you consider the "Search all" option in list settings?
Enable "Search all" and set "include in search all" for any element which should be searched.

I tried doing this just now by enabling search all in the list and enableing include in search all on just one of the elements. unfortunately it still shows me all of my records available no matter what I search for rather than just the ones pertaining to my search.
 

Attachments

  • search.png
    search.png
    126.1 KB · Views: 354
Are you running the latest GitHub?
I can't see this notice and search all is working on my site.
BUT:
be aware, if saving your list settings (with or without any modification) it's resetting all ELEMENTS to "include in search all" = NO!
This has been a solved issue in F3.0, seems it's back in F3.1
https://github.com/Fabrik/fabrik/issues/606
 
Do you consider the "Search all" option in list settings?
Enable "Search all" and set "include in search all" for any element which should be searched.

Are you running the latest GitHub?
I can't see this notice and search all is working on my site.
BUT:
be aware, if saving your list settings (with or without any modification) it's resetting all ELEMENTS to "include in search all" = NO!
This has been a solved issue in F3.0, seems it's back in F3.1
https://github.com/Fabrik/fabrik/issues/606

I am indeed running the latest github. I had made the element "include in search all" enabled AFTER saving the list, so the list did not change it back, the element still had it enabled when I checked and it still doesn't work.

I did however go back to the last again to test what your saying, and I saved the list and it did indeed reset my element "include in search all" to "No". But I believe this is not the problem I am having, as I said, the element was still set to Yes when this does not work. Perhaps I have another setting out of place?
 
Ok I've had a go at refracting the 'show in search all' code.

Now this is ONLY set from the list view, which you can select in the 'details->filters' section using the 'Elements' button.
 
So the search field I've created on the analysis page does nothing. I even tried to create another filter field which was "Unit" to search the "Unit" field in the incident report form. I tried numerous searches and no matter what I searched, it always continues to show the whole list of incident reports without filtering them.

The search bar on the list itself works though, but that's not the manner in which I want this list to operate. I want the search buttons on my analysis page to act as the search form.

Rob's fix did however make the element situation much easier than trying to update each individual element into include in search all ^^ Still doesn't solve my problem though :p
 
So here's a funky one for you. I left the office and went home, tried to use the search again on my personal computer, the search element works exactly as it should...Maybe the other computer wasn't refreshing properly? I have no idea, but I think this is resolved, unless other theories can explain why this happened.
 
could be the session had got confused. List filters are stored in the session and overwritten when you re-post them, or when you clear filters. Perhaps with all the changes in the code there was a filter that was stuck.
 
Sounds probable, plus the internet connection at this office is terrible, could have lost connection amidst a saving process or something, who knows really.

Thanks for the help!
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top