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 1 forks source link

adding_required_fields_logic #36

Closed aranas closed 6 months ago

aranas commented 7 months ago

This is adding logic to check for required fields. The required fields are specified in the config file.

Currently there is still an issue with open text fields, somehow the logic only works for some of them.

aranas commented 7 months ago

no it is a good point, this is probably why it is buggy with the open text questions! Will have to check that

aranas commented 6 months ago

I just pushed a new commit that fixes the required field logic such that

Note that for sliders, the user will have to move the slider for the response to be logged!! this might be confusing

aranas commented 6 months ago

@cptanalatriste the required field logic works now but the widget type specific tests are hardcoded, so not particularly elegant. We will need to keep an eye on this as we go updating the app. I'll add it to the technical test

Would you like to have a look before I merge?

aranas commented 6 months ago

@cptanalatriste could you review just the 6d341af commit, specifically the changes I've made to streamlit_utils.py. I have wrapped the generate_streamlit_element into a class to keep track of number.

I want to make sure this doesn't interfere with other bits of the code in a way that I am not aware of