Hide filtered columns [SOLVED]

Talk about Filter (search) Settings

Moderator: alexandrleonenko

Mircea
Junior
Junior
Posts: 14
Joined: Jul 28th, '10, 05:39

Hide filtered columns [SOLVED]

Postby Mircea » Jul 28th, '10, 05:49

Hi!
In view mode I have to display 16 fields (very large ones) and I've setup filters on 4 of them. Is there a way on the result page to hide the columns that where filtered and display only the ones that don't have a filter or the filter is set on "Any"?
Thank you!

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Hide filtered columns

Postby administrator » Jul 28th, '10, 08:42

Catch filter event by retrieving parameter: prefix._ff_onSUBMIT_FILTER
and then

if(filtering){
first set of fields
}else{
second set of fields
}

Mircea
Junior
Junior
Posts: 14
Joined: Jul 28th, '10, 05:39

Re: Hide filtered columns

Postby Mircea » Jul 29th, '10, 10:30

Worked like a charm!

Thanks for the quick response!

akroll
Senior
Senior
Posts: 33
Joined: Dec 27th, '11, 08:16

Re: Hide filtered columns [SOLVED]

Postby akroll » Feb 28th, '12, 19:16

Should i use like this?:

Code: Select all

if(isset($_GET["wv__ff_orders_erledigt=Ja"])){
                $vm_columns = array(
                 "N"=>array("heade...


Or is this a better solution

Code: Select all

$uri = $_SERVER['REQUEST_URI'];
            parse_str($uri);
            if($wv__ff_orders_erledigt=="Ja"){
                $vm_columns = array(
                 "N"=>array("header"=>"ID", 

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Hide filtered columns [SOLVED]

Postby administrator » Feb 29th, '12, 09:19

Both are working

akroll
Senior
Senior
Posts: 33
Joined: Dec 27th, '11, 08:16

Re: Hide filtered columns [SOLVED]

Postby akroll » Feb 29th, '12, 12:43

maybe i found an error..... please check
vm_columns

Code: Select all

"xxxx"=>array("header"=>"xxxx", "type"=>"label", "align"=>"left", "width"=>"8%",   "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "summarize_sign"=>"", "sort_type"=>"string|numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>"", "on_item_created"=>"setColor") 


when i choose "visible"=>"false" i got:
Field xxxxx, used in the list of fields in View Mode was not found in SELECT SQL! Please, check carefully your code syntax and field name, it may be case sensitive!

it works when i choose "true"

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Hide filtered columns [SOLVED]

Postby administrator » Mar 1st, '12, 08:59

It's not an error, only a warning to remember to developer check carefully the code.
No worries, you may ignore it.


Return to “Settings: Filtering (search) / Autocomplete”