I am very new to python/flask, and i am trying to develop an app where a user can change the of points to a rule to see the effect. The user enters a new value for the points an hits recalculate Table from flask
When the user enters the new information on the first row, the value is passed to python, however on any other row it appears the value is not passed, so I am thinking my error is in the html file. Also is there are way I can pass the corresponding ID as well?
I'd appreciate any help on the matter.
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Weweighting</title><link rel="stylesheet" href="/static/css/stylesheet_rules.css" /></head><body><h1> Rule de tool </h1><form method="post"><table><tr> {% for col in column_names %}<th>{{col}}</th> {% endfor %}</tr> {% for row in row_data %}<tr> {% for col, row_ in zip(column_names, row) %} {% if col == last_column %}<td> {{ row_ }}<input type="text" name="newval" value= "{{text}}" type="number"> <input class="button" type="submit" formaction ="/recalculate" value ="Recalculate" /></td> {% else %}<td>{{row_}}</td> {% endif %} {% endfor %}</tr> {% endfor %}</table></form></body></html>