alan-turing-institute / teadt-community-survey

This is a repository for the TRIC-DT Innovation and impact hub community survey, forming part of the scoping research for the TEA-DT project
0 stars 0 forks source link

disabling text input field when submit button is pressed. #39 #76

Closed aranas closed 1 month ago

aranas commented 1 month ago

When participants have added their definition of Assurance and press submit I want to disable the field. The submit button triggers a definition given by us and I don't want them to go back and adjust their response. During the cognitive pilot participants have mentioned reading the definition made them want to change their response.

aranas commented 1 month ago

we now pass another input to generate_streamlit_element that tracks the st.session_state.disabled and disables the input field if st.session_state.disabled = True. The input is optional, when not passed the field will never be disabled.