deny some values to be filtering

More
7 years 1 month ago - 7 years 1 month ago #66571 by ilo
Hello
I would like to deny some values to be filtering, in a text field, is there a solution to do that please ?
Last edit: 7 years 1 month ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66595 by ggppdk
Hello

only if you change edit field and change its type to:
'textselect'

NOTE1: a dropdown select of existing values will appear in item form
NOTE2: you can customize the drop down select to show only a few value


This is because customized selection of values for filtering is currently implemented only for:
"indexable fields":

select, selectmultiple,
textselect
radio, radioimage
checkbox, checkboximage

So after you change type
in the filtering TAB select to customize the filtering values

either select to show specific values
or select to use and SQL query that excludes values
(add your values in the NOT IN below)
Code:
SELECT value, value as text FROM #__flexicontent_fields_item_relations WHERE field_id='{field->id}' AND value != '' AND value NOT IN('value1', 'value2', 'value3') GROUP BY value


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
The following user(s) said Thank You: ilo

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66611 by ilo
Thank you for your usefull explanation !
I think I have all tried but I don't know how to do this : I would like to disable the possibility to display all items with a text field : it's possible to define a default value for the filter in global configuration and it's usefull, but is it possible to disable the possibility to delete this default-value in frontend and return an empty value instead (that diplay all items) ?

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66614 by ggppdk

I would like to disable the possibility to display all items with a text field : it's possible to define a default value for the filter in global configuration and it's usefull, but is it possible to disable the possibility to delete this default-value in frontend and return an empty value instead (that diplay all items) ?


Hello i am not sure that i understand you

if you want to have a "locked" filter value then it is possible
besides parameter for "default" filter value there is a parameter for "locked" filter values

the above parameters exist
in component configuration
in each category configuration
and in "category-like" menu items


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66622 by ilo
Hello, thank you for your answers, but what I'm looking for is not possible with filter-default-value (in component or category or menu-item) even if locked :
With a text field, it's possible to enter an empty filter value in frontend, that list all items. I just would like to disable this possiblity (to enter an empty value), but with the possiblity to enter all other values, is there a solution for this ?
(the textselect can do that but only with drop-down select-value filter)

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #66623 by micker
did you test mask option in text field ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 1.191 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline