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

180
Views
Form Submission returns 'Undefined' pop up

I have a form I try to submit that can potentially have a lot of data and some users get a simple alert 'Undefined' when trying to submit. I've tried to replicate the issue on my local machine, on our test server and in production and I have no issues with all 3 environments.

I receive no error logs from our logging which leads me to think that it is an issue in the browser or front end since I would probably get a log message if it reached the backend.

...
<form id="WorkplaceIncidentForm" class="incidentReport text-center">
...
<button type="button" class="btn btn-info btn-lg" onclick="SendForm()">Submit</button>
...

function SendForm() {
   var form = $("#WorkplaceIncidentForm").serialize();
        var message = checkInputs();

        if (message === "valid") {
            $.ajax({
                type: "POST",
                url: "@Url.Action("Submit","Form")",
                data: form,
                dataType: 'json'
            })
                .fail(function (result) {
                    alert(result.message);
                })
                .done(function (result) {
                    if (result.success) {
                        alert('Successfully submitted!')
                        window.location.href = '../Form/ReportSubmitted';
                    }
                    else {
                        alert(result.message);
                    }
                });
        }
        else {
            alert('Please fill in ' + message + ' field.');
        }
}
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!