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

185
Vistas
how to make a submit button loop through tabs and submit form for each tab (slim)

I have some tabs and each tab has its own form like below:

ul.nav.nav-tabs 
  -for k,v in @list
     li.nav-item class="active"
       a.nav-link data-toggle="tab" href="##{k}" #{v}


div class="tab-content"
  - for name in @another_list
      div id="#{name}" class="tab-pane fade in active" 
        = form_tag({ action: "route/#{name}" }, method: "put") 
        .form-group  
          textarea.form-control  name= test 
        input.btn.btn-primary type="submit" id = "submit_individual"
    input.btn.btn-primary type="submit" id = "submit_all"

Each tab also has its own button that could submit the form for each individual tab. However I have another submit button with id="submit_all that I want to include so if the button is pressed, the forms are triggered for all the tabs. How would I go about doing this?

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