This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jeff29517
jeff29517

Hi all... love the product.

I was just building out a back-end list with filter functionality. In my requirements my underlying filter needs to apply conditions for the unchecked value (as well as the checked value) of the checkbox. i.e. conditions: (:filtered = 1 || :filtered = 0 and severity > 1000 )

But line 676 of Filter.php returns if the value is not checked. I suggest (and modified locally) a check if ":filtered" value exists in conditions then do not return (something like below), i.e.: if (strpos(json_encode($scope->conditions),":filtered") === false) return; This allows checkboxes to use :filtered How do we go about making suggestions / contributions, etc?

JeffGoldblum
JeffGoldblum

@jeff29517 what you're looking for is the type: switch filter scope: https://octobercms.com/docs/backend/lists#filter-switch

jeff29517
jeff29517

Hi @LukeTowers... thanks for the response.

I am familiar with switch type. it's a 3-state control ( i.e. [+] , [-] , or [ ] ).. which is not quite the same as a 2-state control (i.e. [+] or [ ] only ). Because my condition only has 2 valid states, the use of the switch control creates a redundant state ([-] and [ ] do the same thing for me).

My suggestion was more along the lines of allowing :filtered to be used within a condition statement when the control state evaluates to FALSE. This is useful for me ... perhaps others.

I have run across other quirks and bugs in the last year of developing against the framework, so thought I would ask how contribution works at the same time.

Take care!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.