1
I have the following fields:
<label class="control-label">KM</label>
<input class="input-small" style="width: 50px !important;" type="text" name="km" value="">
<label class="control-label" style="width: 75px !important;" >Descarga</label>
<input class="input-small" style="width: 50px !important;" type="text" name="descarga" value="" disabled>
<label class="control-label" style="width: 75px !important;" >Pernoite</label>
<input class="input-small" style="width: 50px !important;" type="text" name="pernoite" value="" disabled>
<label class="control-label" style="width: 75px !important;" >Romaneio</label>
<input class="input-small" style="width: 50px !important;" type="text" name="romaneio" value="" disabled>
Note that only the first field is enabled.
I need you to fill in some data in the field first, enable the others.
How to do this?
In this case you have to fill and click out to enable the fields, wanted to fill in already enable...
– Sr. André Baill
I get it, when it’s empty you want it to turn off again?
– Erlon Charles
That’s right! It’s empty, disable.
– Sr. André Baill
How I could qualify to fill only numbers in these fields?
– Sr. André Baill
http://www.maisumpixel.com.br/categoria/jquery/somente-numeros-em-campo-input
– Thiago Friedman
set his type to number, I’ll put in the answer with a field like number, but in that case it will also be necessary to verify the
.change()
, You can click on the value exchange arrows– Erlon Charles