two buttons on html page flask

Solutions on MaxInterview for two buttons on html page flask by the best coders in the world

showing results for - "two buttons on html page flask"
Alejandra
27 Nov 2020
1<input type="submit" name="submit_button" value="Do Something">
2<input type="submit" name="submit_button" value="Do Something Else">
3def contact():
4    if request.method == 'POST':
5        if request.form['submit_button'] == 'Do Something':
6            pass # do something
7        elif request.form['submit_button'] == 'Do Something Else':
8            pass # do something else
9        else:
10            pass # unknown
11    elif request.method == 'GET':
12        return render_template('contact.html', form=form)
Luca
26 Nov 2019
1
2<form method ="post" action="/">
3  <button type="submit" name="submit_a" value="submit_a"> Submit_a </button>
4  <button type="submit" name="submit_b" value="submit_b"> Submit_b </button>
5</form> 
6
7
8
9def submit(): 
10	if request.method == "POST":
11		if request.form.get("submit_a"):
12			# do something
13		elif request.form.get("submit_b"):
14			# do something else
15	elif request.method == "GET":
16			# do something
17		
18
queries leading to this page
flask get button namebutton like items inside form flaskflask get all button nameshow to recieve info from button in flaskhow to use a button to return a value in flaskhow to create a button in flaskflask html buttonone form two buttons flaskusing html buttons with flaskobtaining submit button value html flasktwo buttons on html page flaskflask buttonflask do something on buttonrequest butotn flaskflask button example htmlflask button click postpython flask button typesflask button codeflask make a button change pagesimple flask app with buttonsflask button functionrequest form button click pythonbutton value flaskflask get button valueflask html button linkimplement a button in flaskflask print 27done 27 after clicking submit buttondisplay database field in html python flask multiple buttonsrequest button get flaskflask get name of button without submitadd new button flask3buttons flaskcheck button valuje in flaskhow to connect a button to flaskhow to find out if any button has been pressed in flaskhow to make a button in flask pythonadd buttons to flaskconnect flask with buttonflask two buttons one formprint text after submit button is pressed in flaskget button value flaskflask button pressflask html button actionhow to detect when a button is pressed in flaskcreate a button in flaskflask two submit buttonsget value from post button flaskflask button press postadd buttons to html flaskflask trigger action on button press with a specific nameflask multiple buttons examplehow to detect when a button is pressed in flask without formstwo buttons in flaskhow to get the value of a button in flaskcontrolling flask function from html buttonhtml button action flaskflask submit buttonadd fuction to button flaskflask click submit then printbutton submit tag in flaskget request button value flaskpython flask simple buttonflask submit butonview details by clicking a button flaskhow to add button using flaskpython flask lookup record on button click eventtwo buttons html flaskflask pass button with jinja nameflask click submit printadd buttons to flask appget the value of the button clicked python flaskcheck if it is of type submit in python 2b flasktwo buttons html page flasksend a request from flask buttonflask button pythonadd flask code to buttonwhen i use submit button flask uses getclick submit button python flaskbutton flasksend button value to pythonflaskhtml button action for flaskpython flask multiple buttonsbutton different route flaskhtml flask button url forhow to add a button to a flask websitebutton flask pythonadding 3ca 3e tag with buttons in flaskbuttons on homepage flaskhow to recieve button in flaskflask forms buttonflask app two buttonsflask 2b python 2b on click of a button without using formflask transfer data to python on button presspython flask html button pressedflask create buttonflask add buttonflaskform close app buttonuserbutton flask pythonhow to make button code flaskpython flask multiple buttons send data to templatehtml create input button flasksingle button data flaskpython flask code to 2 button in a page route to 2 different pagehow to make buttons and functions in flask pythonpython flask get button valueflask app buttonflask create buttonshow to add a button in flaskflask print 27done 27 after click submit buttonflask http buttoncreate input button in flaskbuttons in flaskpython flask buttonhow to add a button to my flask siteflask buttoinbutton html flaskflask add function to buttonget request in flask from buttonhow to make a button with actions in flaskhow to add next button in flaskhtml button value pythonhow to use button flaskflask html buttonshow to use button in flaskflask button exampleflask detect button pressflask html button typehow to make buttons in flaskflask button to pagehow to use button in flashow to make a button in python flaskaction button flaskfunction in python on html flaskhowt o make an app with flask buttonhow to operate button in flaskflask button formcheck which button has been pressed in flasksubmit button flaskpython flask button exampleflask how to make a buttonhow to make button in flaskhwo to get the value returned by a button in flaskbutton in flaskflask add two buttonsinput from website after pressing a button html and flask pythoncheck which submit button is clicked flaskhow to create a button using flaskbuttons in flask templatespass button id to flask webserverflask button clickif a button is pressed flaskaccess html button in python 3fflask options buttonsubmimt button flaskflask link buttonflask how to add some code to a buttonclick button submit form flaskworking with buttons flaskpython flask making buttonsflask how to get buttonhow to handle button request with flaskflaskform exit buttonflask button onclickhow to check if this button is pressed in flaskcan you add buttons in flask pythonflask python html buttonhow to create a button to another page in flaskflask python buttoncheck input for all buttons flaskget which button pressed flaskform with submit button flaskcreate form on button click flaskpython flask how to submit a button pressbutton in python flaskbutton to function in flaskadd button using flaskcreate button in flaskhtml buttons with flasklinking a html page from submit button using flaskhow to add a button in flask pythonadding button in flaskadd a button in flaskflask button htmlbuttons to new webpage in flaskhow to process a button in flaskbutton action flaskflask post single buttonhow to connect button and flaskflask button get pythonadd two buttons flaskcreate buttons in flaskadd new button flaskflask app buttonsfalsk buttonpython flask submit buttonconnecting html buttons with python flaskflask python make a buttonhow to click a button in flaskflask route buttonflask get value of buttonhow to validate a type button flaskmake button in flaskflask form buttonflask redirect in html on clickcreate input button in html flaskflask use buttonhow to create a button flaskhow to integrate button in html in flaskhow to get button from webpajde flaskrequest button flaskbutton to do flask functionmake a button in flask pythonbutton to retrieve api info flask pythonbutton oin blaskmultiple buttons in flaskhow to reffer to button value in flaskflask tutorial buttonflask function to buttonmaking html button with flaskforms how to get the value of teh button pressed flaskbutton html flak flask python forms buttoncapture buttoon flaskflask get which button is postedpython flask htlm buttonhtml button flaskflask button actionhow to validate a form on type 3dbutton click flaskload template press button flaskhow to make a simple website with button in python flaskflask post buttonflask template with buttonsflask buttons htmlhow to display information if button is pressed flaskrequest form 5b 27submit button 27 5dflask change html on submithow to bind a button to flask functionflask get button pressflask buttonspython flask buttonscreate button webpage flaskmultiple buttons flaskhow to check if a button is clicked flaskhow to make button functions in flaskhow to manage two buttons on a same page flask pythonflask form button requestwhich button pressed in form flaskflask print on button presscreate flask app with buttonhow to make a button with flaskpassing search value from input to button html flaskhow to validate a form on button click flaskflask make buttonload template from press of a button flaskpython flask make a buttonflask python buttonnchecking if button pressed flaskflask use button as sumbithow to assign functions to buttons in flaskcreating buttons in flaskhtml button with flaskhow to make button flaskhow to make a button in flaskhow to have increase number button flaskwhich button is click flaskbutton usage in flaskhow to link flask to buttonhow to implement buttons in flaskflask button post request 3ca 3e button flask pythontwo buttons on html page flask