Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
Flask dynamic table when I select value from dropdown

I'm building my first app and got to point where I want to dynamically refresh my table when I chose some value from the drop down list. I'm using Flask with SQLAlchemy

I have query where all my users are listed:

customers = Customer.query.all()

and in my html page I created a dropdown list

{% for x in customers %}
<option>{{ x.name }}</option>
{% endfor %}

depending on the chosen value I want to automatically generate a table bellow from another query without using a submit button:

invoice = Invoice.query.filter_by(customer="chosen value").all()

and in the html:

<table >
 <thead>
  <tr>
   <th>Description</th>
   <th>Date</th>
   <th>number</th>
   <th>sum</th>
  </tr>
 </thead>

 <tbody>
  {% for i in invoice %}
  <tr>
   <td>{{ invoice.description }}</td>
   <td>{{ invoice.date }}</td>
   <td>{{ invoice.number }}</td>
   <td>{{ invoice.sum }}</td>
  </tr>
  {% endfor %}

 </tbody>

</table>

I know that for this option I need to use jquery and found some examples but couldn't figure out how to twist them for my solution.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!