Radio button inputs to Azure database

Hello Guys,

I have created a survey form using streamlit.
In that form i’m had multiple radio buttons been created,
How can i take the input from the radio button and store it in a database.

For Example:
I’m having a radio button like

ques1 = st.radio(‘Are you happy’,[‘Yes’,‘No’,‘NA’])

if a we select on Yes it should return value yes in the database
if No is selected it should be no and if they select NA then the value should be ‘null’ in the Azure database and im using python as scripting language.

Is there any way that i achieve this?

Thanks in advance
@AvratanuBiswas @dataprofessor

Hi @Ramya_Anand ,

Welcome to the Streamlit community forum :partying_face: :balloon:

As I mentioned you before, the variable assigned with the radio button , can be used to store the result in any database (for example: GoogleSheet) . I’ve not tried with Azure Database, I’m sure someone else in the community can certainly help you out .

And regarding to your Nav Bar example which you provided me (based on Data Prof’s video), can be tweaked based on the needs (it would have been better to mention). Please refer to the code, st.markdown line 6 , you can adapt or change the link based on your url link you want to refer to. For example:


<a class="navbar-brand" href="https://youtube.com/dataprofessor" target="_blank">Data Professor</a>

This line with "https://youtube.com/dataprofessor", can be changed to any other url of, and Data Professor, can be changed to Ramya_Anand's App1 . If this is something you are looking for.

I hope this helps . Goodluck :slight_smile:

Best
Avra

Hi @AvratanuBiswas
This solution helped me a bit and created some hurdles
Annotation 2022-02-17 162347

3 major problems are
i) the colour for the buttons
ii) the alignment of those buttons
iii) i’m not able to add streamlit page in place of the link

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.