Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -330,12 +330,11 @@ def show_field(f: Field, index: int, data_collected):
|
|
330 |
choices = default_choices if not f.other_params.get('choices') else f.other_params.get('choices')
|
331 |
selected_values = st.session_state[key] if key in st.session_state else \
|
332 |
(data_collected[f.name] if data_collected else [])
|
333 |
-
st.multiselect(f.title,
|
334 |
options = choices,
|
335 |
format_func=lambda x: x,
|
336 |
key=key, max_selections=3,
|
337 |
help=f.help)
|
338 |
-
st.session_state[key] = selected
|
339 |
case 'likert_radio':
|
340 |
labels = default_labels if not f.other_params.get('labels') else f.other_params.get('labels')
|
341 |
st.radio(f.title,
|
|
|
330 |
choices = default_choices if not f.other_params.get('choices') else f.other_params.get('choices')
|
331 |
selected_values = st.session_state[key] if key in st.session_state else \
|
332 |
(data_collected[f.name] if data_collected else [])
|
333 |
+
st.session_state[key] = st.multiselect(f.title,
|
334 |
options = choices,
|
335 |
format_func=lambda x: x,
|
336 |
key=key, max_selections=3,
|
337 |
help=f.help)
|
|
|
338 |
case 'likert_radio':
|
339 |
labels = default_labels if not f.other_params.get('labels') else f.other_params.get('labels')
|
340 |
st.radio(f.title,
|