Skip to content
Advertisement

Tkinter displaying users choice back to them once they have clicked a button and submitted and submitted

I’m trying to create a form where a user picks a time, and depending on the option they pick. It is then displayed back to the user once they click the submit button. But when i click an option and submit it prints all four options regardless. I also am trying to make it such that once a user clicks one of the options they are unable to click another. Here is my code so far.

JavaScript

Advertisement

Answer

Try this:

JavaScript

It uses Radiobuttons and notice that all of them have the same variable (btn1) but different value. Also I made it so that the buttons get disabled when the user clicks submit.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement