html - jquery validation with form inside tabs -
i have 2 tabs has input form inside these tabs(the tabs inside 1 form). in first tabs input required , second 1 isn't. lets didn't fill first input , on second tabs. , when submit form, validation on first tabs doesn't work. , submit form
here html:
<ul class="nav nav-tabs"> <li class="active"><a href="#price" data-toggle="tab">price</a></li> <li><a href="#category" data-toggle="tab">category</a></li> </ul> <div class="tab-content m-t"> <div id="price" class="tab-pane fade in active"> <div class="col-sm-4"> <div class="form-group"> {!! form::label('price','price',array('class' => 'control-label')) !!}<span><strong> * :</strong></span> <div class="input-group"> <span class="input-group-addon">rp</span> {!! form::text('price', null, array('class' => 'form-control currency_inputx rupiah', 'required' => 'required') + $extraattributes) !!} </div> </div> </div> </div> <div id="category" class="tab-pane fade"> <div class="col-sm-4"> <div class="form-group"> {!! form::label('category','category',array('class' => 'control-label')) !!}<span><strong> * :</strong></span> <div class="input-group"> <span class="input-group-addon">rp</span> {!! form::text('category', null, array('class' => 'form-control currency_inputx rupiah') + $extraattributes) !!} </div> </div> </div> </div> </div>
please me thanks!
Comments
Post a Comment