based on this form, I need to take the user inputs to have a value so I can return the total cost of their order.
(https://i.sstatic.net/eASlqo0v.png)
code:
Gift_shape_label = tk.Label(self,text=”Enter the shape of your gift: “,bg=”#54527E”,fg=’light cyan’)
Gift_shape_combobox= ttk.Combobox(self, values= [“Cube”,”Cuboid”,”Cylinder”])
Gift_shape_label.place(x=10,y=20)
Gift_shape_combobox.place(x=10,y=50)
Pattern_design_1_label = tkinter.Label(self,text="Select paper design one or two: ",bg="#54527E",fg='light cyan')
Pattern_design_1_combobox= ttk.Combobox(self, values= ["One (cheaper option)","Two (expensive option"])
Pattern_design_1_label.place(x=10,y=100)
Pattern_design_1_combobox.place(x=10,y=130)
height_label= tk.Label(self,text="Enter the height of the gift in cm:",bg="#54527E",fg='light cyan')
height_label.place(x=10,y=180)
height_entry= tk.Entry(self)
height_entry.place(x=10,y=210)
width_label= tk.Label(self,text="Enter the width of the gift in cm:",bg="#54527E",fg='light cyan')
width_label.place(x=10,y=260)
width_entry= tk.Entry(self)
width_entry.place(x=10,y=290)
radius_label=tk.Label(self,text="Enter the radius of the gift in cm (enter '0' if not applicable):",bg="#54527E",fg='light cyan')
radius_label.place(x=300,y=10)
radius_entry= tk.Entry(self)
radius_entry.place(x=300,y=40)
depth_label=tk.Label(self,text="Enter the depth of the gift in cm:",bg="#54527E",fg='light cyan')
depth_label.place(x=300,y=90)
depth_entry= tk.Entry(self)
depth_entry.place(x=300,y=120)
AddBow_3_label = tk.Label(self,text="Would you like to add a bow?: ",bg="#54527E",fg='light cyan')
AddBow_3_label_combobox= ttk.Combobox(self, values= ["Yes","No"])
AddBow_3_label.place(x=300,y=170)
AddBow_3_label_combobox.place(x=300,y=200)
AddGiftTag_4_label = tk.Label(self,text="Would you like to add a gift tag?: ",bg="#54527E",fg='light cyan')
AddGiftTag_4_label_combobox= ttk.Combobox(self, values= ["Yes","No"])
AddGiftTag_4_label.place(x=300,y=250)
AddGiftTag_4_label_combobox.place(x=300,y=280)
Characters_5_label = tk.Label(self,text="Enter the number of characters you would like on the tag: ",bg="#54527E",fg='light cyan')
Characters_5_entry= tk.Entry(self)
Characters_5_label.place(x=300,y=330)
Characters_5_entry.place(x=300,y=360)
Entermessage_label = tk.Label(self,text="Enter your message here: ",bg="#54527E",fg='light cyan')
Entermessage_entry= tk.Entry(self)
Entermessage_label.place(x=300,y=410)
Entermessage_entry.place(x=300,y=440)
Summary_label = tk.Label(self,text="Your summary: ",bg="#54527E",fg='light cyan')
Summary_label.place(x=300,y=500)
Choose_colour_label = tk.Label(self,text="Select the colour of the paper:",bg="#54527E",fg='light cyan')
Choose_colour_label.place(x=300,y=750)
Choose_colour_combobox= ttk.Combobox(self, values= ["Purple","Dark grey","Sky blue","Light green","Red","Gold"])
Choose_colour_combobox.place(x=300,y=780)
button_data = tk.Button(self, text="Enter",bg="#54527E",fg='light cyan')
button_data.place(x=500,y=600)
buttonx= tk.Button(self,text="Back to booking",bg="#54527E", fg='light cyan',command= lambda: controller.show_frame(PageTwo))
buttonx.place(x=10,y=600)
for example, I need to take the dimensions they enter (height,width…), then multiply them with either 0.4 (if they select the cheap paper option), or 0.75 (if they select the expensive paper)
then if they want to add a tag, I need to add $1.50 to the total, etc
how do i take the user inputs and give them a total cost
user25207541 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.