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

234
Views
Form Data Select passing 'undefined'

I am having an issue with my Form Submit function

Everything is submitting as expected other than the 'Option' from my 'Select'.

It is getting passed through as 'Undefined'

I'm wondering if this is because the Options in the select are generated programmatically at runtime?

My code for the select is:

        <label for="devname">Developer Name:</label>
        <select id="devname" name="devname">
            <option  value="">Choose name..</option>
        </select><br><br>

The code i've got that generates the options is:

function populateSelect() {
    $.get('/GetDevs').done(function (devs){
        var index = 0;
        var selectme = document.getElementById('devname');
        for (index = 0; index < devs.length; ++index) {
            var dev = devs[index];
            var opt = document.createElement('option');
            opt.value = dev.Devid;
            opt.innerHTML = dev.dname;
            selectme.appendChild(opt);
        }
    });
}
populateSelect();

This successfully populates the option but as i say, when i post the form it gets passed 'undefined'

Any ideas would be appreciated

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!