Disable ALL in navigation filter not functional

p38

Active Member
Hi,

Are there any other settings to disable the "All" label in the filter dropdown?

I only want the user to filter on the dropdown items, not all data.

paul
 
yup, edit the list, under the navigation section - set 'Show all option' to 'no'
 
Thanks,

I meant how to remove the "All" label on the ELEMENT dropdownlist on the filter header on each element.

eg: element1 dropdown filter

  • All
  • Myvalue1
  • MyValue2
  • MyValue3

Remove the "All" from this list

Paul
 
Hmmm, yeah, that option only applies to the actual navigation 'rows per page', not to filters.

One option is to make that filter required, so "All" is not a valid selection.

-- hugh
 
The idea of taking the "All" out of the dropdownlist prevents the user of resetting the filter, and forces the user to always have a filter selected.

So in this way you are forcing the user to only select data based on the items of the element filter dropdown.

Is it not possible you can add this to the element filter section....

eg: "Show all option" Yes/No

Then all you need to do when populating the dropdown list, is to NOT insert the ALL label at first position if selected No.

Thats all, you dont need to change any other code.

Paul
 
If we added such an option, what should the default selection on the dropdown be when first loading the list? That's the issue we came across last time we looked at this. The dropdown needs to reflect the current state of the filter. When you first load the list, the user has made no filter selection, but the nature of a dropdown is such that there is always something selected.

I seem to recall we figured the best approach would be to check the "required" status of the filter, and if it is required, instead of saying "All", say "Please Select...". In fact, I could have sworn we did that, but maybe that was in 2.1.

I would definitely prefer to do that, than add YAFO to the element filter settings.

-- hugh
 
There are one or 2 problems with the logic of "Required" status....

1) I am not using "advanced Search Icon" so the first time a list is displayed, the list does not have any records, and the list header does not display. So we are stuck with no drop down. Using advanced search gets data and header, but this is not what we want.

2) Assuming this works, you want the list to default filter to the FIRST dropdown item, having a "Please select" is pointless as this is why you are choosing this facility in the first place. The user then has to do an extra action to get data. As we all know, we cant assume users will know what to do if there is a blank list.


So if you can fix 1 and 2, then I can use this.

Paul.
 
1 - hmm so you are using filters under headings I guess? An option would be not to use that but to put the filters above the headings?

2 - you can default to a filter value by using a querystring value http://fabrikar.com/forums/index.php?wiki/filtering-lists-tables/

Basically what Hugh said is the issue, removing please select will just give the appearance of erroneous data, and then we'd have to support lots of users asking why it was like that ;)

If this is something you are dead set on then I'd suggest using the querystring filter to set default filter values (which would then also filter the list) and some js to remove the 'please select' option.

The js would be in components/com_fabrik/js/list_X.js where X is your list id:

Code:
window.addEvent('domready', function () {
document.getElements('select.fabrik_filter').getElements('option[value=]').each(function (o){
 o.destroy()
});
});
 
Hi Rob,

If you can solve no 1 (filter in headings) then I can live with the "Please select..." in no 2 for now. I need the filter to be under the headings.



Paul.
 
Hmmmm. As I recall, the issue of filters under headers vs 'required filter' is not an easy one, I seem to remember looking at this before, and coming to the conclusion it is non-trivial.

But I'll have a look.

-- hugh
 
1) I am not using "advanced Search Icon" so the first time a list is displayed, the list does not have any records, and the list header does not display. So we are stuck with no drop down. Using advanced search gets data and header, but this is not what we want.
Perhaps there are other settings that you are using that is creating this, I just turned on require filtering , advanced search off and filters = under headings on my test list and this is what I see:
http://screencast.com/t/hcnoGfyf4BW
 
I tried using the default template list as per your screenshot and this works, so it looks like there is some problem when one uses "requires filter" and the custom_css.php css overrides.

Normally the template overrdie works just fine.

I have attached it for you to see, all I have done is change some coloring, font and opacity.

I have also attached a screenshot of what the list looks like, you will see there are no headers at all.

Paul
 

Attachments

  • custom_css.zip
    1.1 KB · Views: 261
  • Image2.jpg
    Image2.jpg
    32.8 KB · Views: 262
Hi Paul

Its not the css - I applied that file to the default list template, and I still get the headings. I took a look around your site but couldn't see which list this issue was for. I might need a specific user login to test? Could you tell me which page it is as well please?

thx
Rob
 
Will the 'demo' uses LastPass has for me for that site work for testing this?

You'll have to bump this once we're clear to get on the site.

-- hugh
 
Hugh you could just check rather than asking! :) Would have taken you just as long to test that than write the post

@Paul - I see the issue now with your template - the wife's just told me to stop to eat but I;ll look at the template afterwards
 
right :)
The issue was that the default.php file was slightly behind in the golfscore template you were using compared to the current code, it was missing a change that specifically addressed this issue.

I've made a new list template 'golfscore2' - basically the same as golfscore but with the default template's default.php file copied into it and things seem to show as expected - you can test @

http://golfscore.co.za/index.php/setup/teeoff-times?layout=golfscore2

I had to set the list to require filters to test, and i've not changed that back. But I've not changed the front end template to be golfscore2.

-Rob
 
Thanks Rob.

The golfscore template is just a copy of the default templates, I use custom_css.php to make all the changes I want.

Now is there any way I can subscribe to a feed that will let me know when a default template code has been changed?

In this way, I will know to update my copied templates.

regards

Paul.
 
Not really. Well, more through lazyness on our part, LOL!

We do have a "Code Announcements" forum, with an RSS feed, which we announce any major changes to the code that impact people writing their own custom code. But typically we don't announce template changes there.

We could start doing that, although of course that relies on us remembering to post there when we tweak a template.

I just did a little research on github itself, to see if you can get an RSS feed of commits. Turns out you can, but only on a per-branch basis. I was hoping you'd be able to set up a filtered feed, which only showed commits on certain folders or files (like the ./views folder), but alas ...

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top