Answer the question
In order to leave comments, you need to log in
How to get input value if there are two of them and they change?
Hello.
There are 2 inputs and select. for example
<select class='form-control' name='select'>
<option value='1'>Открыть первое текстовое поле</option>
<option value='2'>Открыть второе текстовое поле</option>
</select>
<input type='text' name='input1' id="input1" class='' placeholder='Введите почту'>
<input type='text' name='input2' id="input2" class='' placeholder='Введите номер телефона style='display:none'>
Answer the question
In order to leave comments, you need to log in
No need to shove heterogeneous data into one cell.
Make two fields tel and email, both nullable and fill in the data that came.
But if you still want to, then along with both inputs you will receive a select value, on the basis of which you can make a choice which of the two input values to choose to save in the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question