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

175
Views
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
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!