-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Share variables between inputs in input_group #74
Comments
PyWebIO does not support this feature currently. I will add it in todo list. Here is a workaround for now: DBs = ['DB1', 'DB2']
Tables = {'DB1': ['Table1', 'Table2', ], 'DB2': ['Table3', 'Table4']}
db_name = select(label='Select the database of the table:', options=DBs)
table_name = select(label='Select the name of the table:', options=Tables[db_name])
put_text(table_name) |
Thanks for fast response! And for the workaround! |
Now you can use the Doc: https://pywebio.readthedocs.io/en/latest/input.html#pywebio.input.input_update |
|
@errorcode7 the demo address now is https://pywebio-demos.pywebio.online/doc_demo?app=demo-input-update Also, the bug you just found was fixed just now, but the demo server have some cache and still don't work |
Is it possible to define one of the inputs based on another input when we have multiple inputs in input_group? This requires some way of passing the output of an input in the input_group to the next input. An application of this is when we have two drop down menus for example and the options of the second drop down menu change based on what the user chooses from the first drop down menu. Something like this example:
So is there a way to bind the options of the second drop down menu above to the user selection from the first drop down? Like if the user chooses 'DB1' then the options in the second menu will be 'Table1' and 'Table2' but if the user chooses 'DB2' the options will be 'Table3' and 'Table4'.
The text was updated successfully, but these errors were encountered: