Category row and drop-down

Hi all I really hope you can help I want to create a categories page that refers to my categories row but gets selected from a drop-down I believe I need a whole form that does this I’m not sure if I can just simply do this in code instead of making a whole form based on categories so everytime user selects a category say iPhone 12 or iPhone 14 it will show all products from those categories is this possible please I’ve been stuck on this a while now and I just need to finish this and my search bar to get my app published

you’ll be able to see what I’ve tried and how it’s not working :

Ps in no way am I a professional but I love this and would like to learn a lot more

(Anvil | Login)

Clone link:
share a copy of your app

You need to be more specific with your case. Providing a clone link isn’t enough. You also need to specify where exactly your current code is in the clone app.

Ok right so In the code for the form labelled main i have got a drop-down in the side bar code:
def category_dd_change(self, **event_args):
“”“This method is called when an item is selected”“”
categories = app_tables.categories.client_readable(Categories(row=“category”))
self.column_panel_2.add_component(Categories(row=“category”))
I wanted to know two things from this if possible please.
1: do I need like a categories page and categories item that will display the drop-down products from the specific rows
And 2: if I don’t need a whole form for this drop down what am I doing wrong that it’s not linking the drop-down to my products and displaying them on the screen??
Help would be greatly appreciated thanks.

Oh and the error currently is saying runtime error contact anvil support ? I’m not to sure where I’ve gone wrong