i need change some values of my form with JS. i yeah, i can see the changes in my form, but when i send the form in my request i cannot see the values that i modify with javascript.
this is code js where i make the updates
var estructure = $('#SimpleJSTree').jstree(true).get_node(parents[i]).original;
switch (estructure.est) {
case 'fondo':
//document.getElementById("found").value = estructure.est;
$('#found').val(estructure.est);
break;
case 'serie':
//document.getElementById("serie").value = estructure.est;
$('#serie').val(estructure.est);
break;
case 'subserie':
//document.getElementById("subserie").value = estructure.est;
$('#subserie').val(estructure.est);
break;
default:
break;
}
and this is tags that i want changes, obviously all this are in tag form
<div class="input-field col s6">
<span>Fondo</span>
<input id="found" value=""type="text" placeholder="Found" name="found" disabled>
</div>
<div class="input-field col s6">
<span>Seccion</span>
<input id="section" type="text" placeholder="Section" name="section" value="">
</div>
<div class="input-field col s6">
<span>Serie</span>
<input id="serie" type="text" placeholder="Serie" name="serie" disabled value="">
</div>
<div class="input-field col s6">
<span>Sub Serie</span>
<input id="subserie" type="text" placeholder="Sub-Serie" name="subserie" disabled value="">
</div>
and this is the request and how you can see in the request i dont have the value of the input that i change
CodePudding user response:
Your inputs have disabled attribute which means they are not send after form submition just remove that and you should be able to see your inputs on backend