posted 7 years ago
I looked for a flask/django forum on Coderanch but couldn't find one so I went with the next best thing;
So I'm completely stumped on this and it's frustrating I will explain why.
First here's my form class in routrs.py;
// The countries
I have a piece of javascript code that inserts data into a select field with the "attractions" class when the user select a country from a list on the same page. It works as expected.
I can access the form country (as in form.country.data) in my routing function calc():
However form.data.attractions returns the empty list '[]'
Even when I select different countries the form.attractions.data always return an empty list '[]'
The QUESTION: How can I access dynamically modified fields (modified by javascript) in flask.
And in my javascript file I have
Affected HTML code
I have looked around but couldn't find anyone with this exact same problem
Getting form.attractions.data is important because It's used to determine various fields in the rendered template that is returned
Thank you.