Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda