I want to search for the name of snake that's in a list and based on that snakes ID, show that snake on a new page. I've been stuck on this for a few hours now and tried searching for it with no luck. I'm very rusty on HTML, maybe Im doing something wrong there?
 <form method="POST" action="{{url_for('search', name=name)}}">
        <input type="text" name="name">
        <input type="submit" value="Sök efter orm">
 </form>
@app.route('/search/<string:name>', methods=["GET", "POST"])
def search(name):
    found_snake = next(snake for snake in snakes if snake.name == name)
    found_id = found_snake.id
    return render_template('show.html', snake=found_id)
 
    