I am in the middle of this js from morning everytime i think it is going to be completed i get another block. What i am trying to get is the values from the different elements like some of them are <input type="text">
and others were <select>
here is my code
var eduarray = [];
$('.education-groupbox').each(function(index, el) {
eduarray[index] = [];
var s = $(this).attr('id');
//console.log();
$('#'+s+' .inputs').each(function(key, value) {
//console.log($(this).children('.seviyeoptions').val());
if(key == 1)
{
eduarray[index][key].push($(value).children('.seviyeoptions').val());
}
});
});
and here is the html part
<div id="education-groupbox" class="education-groupbox">
<div class="inputs col-3">
<label for="email">Seviye</label>
<select class="seviyeoptions" name="" id="">
<option value="option one"></option>
<option value="option one">Option One</option>
<option value="option two">Option Two</option>
</select>
</div>
<div class="inputs col-3">
<label for="email">Okul Adı</label>
<input type="text" name="email" />
</div>
<div class="inputs col-3">
<label for="email">Bölüm</label>
<input type="text" name="email" />
</div>
<div class="inputs col-3">
<label for="email">Mezuniyet Yılı</label>
<select class="mezuniyetoptions" name="" id="">
<option value="option one"></option>
<option value="option one">Option One</option>
<option value="option two">Option Two</option>
</select>
</div>
</div>
I want to get all the values from the all form elements which are in .inputs class block. please advice.