I am making an order form, I use jquery, in this case, after completing the form, I added a "check data" button in which I send all the data to another form with:
var TratamientoOD = $('#TratamientoOD').val()
var familiaOI = $('#familiaOI').val()
var disenyoOI = $('#disenyoOI').val()
var pasilloOI = $('#pasilloOI').val()
var indiceOI = $('#indiceOI').val()
var materialOI = $('#materialOI').val()
var TratamientoOI = $('#TratamientoOI').val()
The "problem" that arises is that these data, I take them from the database, with what in the value, the ID is really storing me (Which is necessary, to be able to do the nested select)
The case, that when I send the data according to the jquery above, it stores all the ID's, and I would like to know if there is any way to store the "Name"
That is, if you choose "hello" in the select, it does not leave ID 1, but you can see "hello" when assigning the field to the new field.
var TratamientoOD = $('#TratamientoOD').val()
I appreciate the help of everyone as always.