What I’m trying to do:
I’m trying to make a dropdown select the placeholder value if the bound value retrieved from the db is None
What I’ve tried and what’s not working:
TBH I think this should be default behavior.
Tried to do it manually like this but it doesn’t work:
Code Sample:
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.details = anvil.server.call('get_user_details')
self.init_components(**properties)
if self.details['my_therapist'] is None:
self.my_therapist_dd.selected_value = self.my_therapist_dd.placeholder
# Any code you write here will run before the form opens.
Can you even manually select the placeholder?