0
votes

I am practicing CRUD using Flask, when I update a record I would like the data from that record to be populated in a form in my update.html for editing. I was able to populate the other fields but I cannot do so with the select field. What am I missing?

This is the rendered page showing a table with data from the database: enter image description here

When I click on update, it brings me to an update page where the data are passed to the update fields to make it easier for editing. As you can see here, the sex select field is not populated.

enter image description here

This is what I have on my update route:

enter image description here

And this is my update.html showing the select field in question.

enter image description here

Please add code and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.snakecharmerb
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community