I have several fields and others in display:none
(In advance I notice that I have already been in the stack and I even found a similar question but could not get the expected result.)
I need to validate them, however I need to enable a submit button, my code is not inside a form, this is what has hampered.
My code below:
<style>
#btn_Codigo,
#btn_Nome,
#btn_Sexo{
display: none;
}
</style>
<div class="upage vertical-col left hidden" id="parte01">
<ion-header-bar class="bar inner-element uib_w_1 bar-positive bar-header" data-uib="ionic/header" data-ver="0">
<div class="buttons widget-container content-area horiz-area wrapping-col"></div>
<h1 class="title">Cadastro de Tratamento</h1>
<div class="buttons widget-container content-area horiz-area wrapping-col">
<div class="button-bar widget uib_w_16 d-margins" data-uib="ionic/button_bar" data-ver="0"></div>
</div>
</ion-header-bar>
<div style="height: 45px;"></div>
<div class="tabs widget uib_w_18 ajusteMargin" data-uib="ionic/tab_bar" data-ver="0"><a class="tab-item widget uib_w_19" data-uib="ionic/tab_item" data-ver="0" id="btn_Pessoa">Pessoa</a><a class="tab-item widget uib_w_20" data-uib="ionic/tab_item" data-ver="0" id="btn_Consulta">Consulta</a><a class="tab-item widget uib_w_21"
data-uib="ionic/tab_item" data-ver="0" id="btn_Pagamento">Pagamento</a>
</div>
<label class="item item-input item-select widget uib_w_2 d-margins" data-uib="ionic/select" data-ver="0">
<div class="input-label">Estatus</div>
<select id="slc_Situacao">
<option>Ativo</option>
<option>Inativo</option>
</select>
</label>
<label class="item item-input widget uib_w_23 d-margins item-stacked-label" data-uib="ionic/input" data-ver="0"><span class="input-label">Ultimo levantamento</span>
<input type="date" id="dt_UltimoLevantamento">
</label>
<label class="item item-input widget uib_w_3 d-margins borderObrigatorio" data-uib="ionic/input" data-ver="0" id="txt_Cliente">
<i class="icon placeholder-icon ion-android-search ion"></i>
<input type="text" placeholder="Cliente">
</label>
<button class="button widget uib_w_4 d-margins button-small button-balanced ion ion-android-contact icon-only" data-uib="ionic/button" data-ver="0" id="btn_NovoCliente"></button>
<label class="item item-input widget uib_w_5 d-margins borderObrigatorio" data-uib="ionic/input" data-ver="0" id="btn_Codigo">
<input type="text" placeholder="Código">
</label>
<label class="item item-input widget uib_w_6 d-margins borderObrigatorio" data-uib="ionic/input" data-ver="0" id="btn_Nome">
<input type="text" placeholder="Nome">
</label>
<label class="item item-input item-select widget uib_w_7 d-margins" data-uib="ionic/select" data-ver="0" id="btn_Sexo">
<div class="input-label">Sexo</div>
<select id="btn_Sexo">
<option>Masculino</option>
<option>Feminino</option>
</select>
</label>
<button class="bar button inner-element widget uib_w_8 bar-footer fixedBot tom button-assertive ion ion-alert-circled" data-uib="ionic/button" data-ver="0" id="btn_Proximo1"></button>
</div>
When I click the #btn_Pessoa
button, I give .show()
in the fields to show it, so it starts to be part of the requirements.
When all the fields are correct, I need to modify my button for the code below:
PREVIOUS:
<button class="bar button inner-element widget uib_w_8 bar-footer fixedBot tom button-assertive ion ion-alert-circled" data-uib="ionic/button" data-ver="0" id="btn_Proximo1"></button>
BACK:
<button class="bar button inner-element widget uib_w_8 bar-footer fixedBot tom button-balanced" data-uib="ionic/button" data-ver="0" id="btn_Proximo1">PRÓXIMO</button>
How to do it all?
I'm doing in HTML5, CSS, JQuery, I do not have a backand because the button just redirects to the next level of registration so to speak. Sincerely.