Trouble editing code for a dropdown component

Hi! Total noob here. I’m finding examples providing code snippets explaining how to edit code supporting components. In my case, I’m trying to set two-tuples for a dropdown component. Looks like I just need something like:

self.my_dropdown.items = [('best option',5),('worst option',0)]

However, I cannot seem to locate the editor in which to make such a change. Trying to do so in the form code editor throws errors about self not being defined. And for the life of me I cannot find code behind the components themselves.

Super grateful for any leads here!

Thanks!

ACK! All I had to do was post a question to then figure it out!

I was not editing in the __init__ constructor for the form. Working great now!

4 Likes