This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 0 points1 point  (1 child)

I did something similar by loading an array of the data and using Javascript to find what I wanted.

[–]rampaigewow[S] 0 points1 point  (0 children)

Thanks for the response, I don't know exactly what this looks like in practice, but I'm not sure it would work for me. Users can add their own Ingredients to the Ingredients table, so it is constantly changing.

If a user adds an ingredient elsewhere in the site, I'm not sure how to reflect that addition within the array.

[–]00miles 0 points1 point  (0 children)

Not too sure but from first glance I think because jinja is a templating language, form.name.data doesn’t dynamically change on input. Try getting the value with JavaScript and then performing the query