I'm working on a web app with Flask but am a novice and am struggling to learn with the documentation. Within a form on a webpage, I have a table of images which are all buttons. I have a Python script, that when passed a specific string will retrieve a small piece of text data from an API. For each cell in the table, my HTML is in this format:
<form action="/" method="POST">
<table>
<thead></thead>
<tbody><tr>
<td><input type=image src="image.jpg" name="SNOWY OWL" value="SNOW"/></td>
<td><input type=image src="image.jpg" name="BARD OWL" value="BARD"/></td>
<td><input type=image src="image.jpg" name="BARN OWL" value="BARN"/></td>
</tr></tbody>
</table>
</form>
When passed with the string in the value= attribute of <input>, a function in my Python script can return what I'm looking for.
Is there a simple method using Flask to take this value= attribute and plug it into a Python function, and return the results in text on the webpage?