15 Posts
Oberon
10 years ago
2
Topic
Hi all

I made a search form with 3 fields 'Lastname' 'Firstname' and a select multiple linked to joomla category field (catid).

If I select one or more Categories, no problem, it works well. But I want the possibility for users to not select a category to obtain a result on all categories.

How can I do this?


Best regards

Oberon
Get a Book for SEBLOD
693 Posts
rpoy
10 years ago
0
Level 1
Hi Oberon,

Have you tried a Select Dynamic field?  You can define your own Where clause to limit the search like:
SELECT*FROM #__categories WHERE id !=myIDthatIdontwant;


Hope that helps,

Randy
15 Posts
Oberon
10 years ago
0
Level 1
Hi


I use this: SELECT title AS text, id AS value FROM #_categories WHERE parent_id = '10'

and I put, in the default value form of the field, all the categories values separated by a coma, and then all categories are selected by default.

Best regards

Oberon
Get a Book for SEBLOD