This is part of my code in flask, written in Python
...output += '''<div class = recsettings>
Recording
<div class = recduration>
change recording duration here
<form method ='POST'>
<input placeholder = 'duration' name='duration' id ='duration'> <---HERE
<button type ='submit' action ='/duration'>Submit</button>
</form>...'''
I now want to get the input of the placeholder when clicking on submit in another method. The redirect to /duration obviously does not work, dont know how to get that fixed either
@app.route('/duration', methods=['GET', 'POST'])
def duration():
tst = request.form.get("placeholder"); <---- Something like this
print (tst)
return redirect(url_for('settings'))
Must be without php
I have found no valid argument for placeholder, rather an alternative:
The other method:
Does the same thing but without the placeholder, you could make it hidden and put a fake placeholder above there. Would be a solution, if not the cleanest.