Drop Down Filter

Is anyone able to achieve the below-categorized filter dropdown?

I’m not clear what you are trying to achieve, could you provide more information please.

Hey,

Can you check it in the below link.

https://roberts.knack.com/farmers#dropdown/

for this, I just create a view with rich text and add that dropdown there …
when we change dropdown value then i add selected value in textbox .

Regards,
Sunny Singla

2 Likes

Hey @Sunny_Singla - I hope you are keeping well.
Now that I’ve seen your example I understand the original requirement.
I like the solution :+1:
Are you using any code to achieve this?
If not, could you explain in more detail as this an interesting drop down solution.

Hello Carl,

I’m well, hope you are good as well.

Yes, it’s a customization solution. For this, i created a rich-text area above the view and add this category dropdown html .


also we can create this opt group using javascript as well from any table dynamically

Regards,
Sunny Singla

2 Likes

Thanks @Sunny_Singla - I thought this must be using custom code to achieve the desired result.
Good to know this type of option can be built if required. :+1:

1 Like

Thanks for your support.

Hi, Thanks Sunny.

Great solution,
but How do you add selected value in textbox?

Rgds, Pablo

Pablo Marzoratti
pablo@garlantech.com

Sunny_Singla Knack Expert
February 17

Hello Carl,

I’m well, hope you are good as well.

Yes, it’s a customization solution. For this, i created a rich-text area above the view and add this category dropdown html .

also we can create this opt group using javascript as well from any table dynamically

Regards,
Sunny Singla

Hello Pablo,

just 2 line javascript used to put value in the textbox
$("#selectName").live(“change”, function () {
$("#field_168").val($(this).val());

});
selectName-> dropdown id
field_168-> textbox id

Regards,
Sunny Singla
ssingla1985@gmail.com

Many thanks Sunny

Hello Sunny,

I’ve made the HTML Dropdown which you kindly showed us how to do, but how do I make that become a Search Filter for my database, as in how do I create the search/reset button to use the dropdown selection please.

I’m totally new to this, so please forgive me, but what I need to be able to do is allow searches from dropdown menus rather than users having to type in everything. I intend to have a few of these to enable searches from different fields (which I’m aware will only work individually), unless you know of a way to select multiple criteria and then hit the search to find all records meeting the multiple criteria.

Kind regards,

Dunkie
Data Breaches Digest