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

166
Views
Uncaught (in promise) TypeError: $(...).submit(...).then is not a function when making an API call

I have a link which submits a POST request, and it was functioning well until I made some changes to my code, which as far as I'm aware have no bearing on this particular function. However, when I click my button I then receive the following error in console, and despite having looked into it, I'm not so sure how to rectify this, as it was working previously. I'd also like to understand the cause more.

Uncaught (in promise) TypeError: $(...).submit(...).then is not a function

In reference to this code:

$("#bugForm").submit((e) => {
        e.preventDefault()
        const input = document.getElementById('nameInput');
        bugInfo = {
          "name": `[${idTicket}] Bug report`,
          "story_type" : "Bug",
          "description": `+ ${data.ticket.brand.url}/agent/tickets/${idTicket}` + " \n" + `+ ${input.value}`,
        }
        reportBug(bugInfo).then(collapse.collapse('toggle'))
      }).then(() => {

        clearFields();
      })
    });
  });
});

HTML:

<form id="bugForm" method="POST">
      <textarea class="form-control" name="name" autocomplete="off" id="nameInput" rows="2"></textarea>
      <div id="sendbutton">
        <button type="submit" id="feedback-button" onclick="changeSecond();" class="btn btn-primary float-right">Send message</button>
      </div>
    </form>
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!