invent icon indicating copy to clipboard operation
invent copied to clipboard

Dynamic SELECT / MULTICHOICE options

Open sudofrank opened this issue 5 years ago • 1 comments

It would be useful to be able to dynamically create a selector field e.g. using a list stored in the data_store, something like:

Card(
    "my_selector_card",
    form=Inputs.SELECT,
    options={my_list_in_data_store},
    ...
)

or otherwise dynamically generate a list:

Card(
    "my_selector_card",
    form=Inputs.SELECT,
    options=my_function(my_vars, ...)
    ...
)

sudofrank avatar Oct 15 '19 20:10 sudofrank

hey @sudofrank sudofrank, I think this is a wonderful idea and would also like it for sliders. this is in the context of a gambling game

Card("betting", text="how much do you want to bet", form=Inputs.SLIDER,options=(0, int({money}), 5), buttons=[{"label":"bet", "target":bet},{"label":"all in","target":allIn}]),

SherbertLemon64 avatar Oct 18 '19 17:10 SherbertLemon64

Closing this since sliders (along with all the various ways you can configure them), are a part of HTML (see this, and since we're re-writing PyperCard on top of PyScript... "it should just work" :tm: 😉

ntoll avatar Mar 29 '23 15:03 ntoll