jqBootstrapValidation icon indicating copy to clipboard operation
jqBootstrapValidation copied to clipboard

jqBootstrapValidation not working on Tabbed forms

Open renierdbruyn opened this issue 11 years ago • 3 comments

I have posted a question on stackoverflow:

I am using jqBootstrapValidation on a form that is tabbed, I have split it up in to multiple forms, because I needed to be on the first tab for the validation to work. With the multiple forms, regardless of the tab, it validates.

I am using a single button to submit the form data to the server(The validation works if the forms have their own buttons). I have tried to move the initiator inside my AJAX request:

 $("button").click(function(e) {
     e.preventDefault();
     $("input,select,textarea").jqBootstrapValidation();// initiator
     var url = "{{'candidates.json'|route_url}}";
     var data = $("form[name=modify]").serialize();

     console.log(data);
     $.post(url, data).success(function() {
         update_messages(); // displays a flash message
     }).error(function() {
             console.log(url);
         alert("failed");
     });
 });

I have also tried using it outside of the AJAX. Is it possible to achieve my goal of validating with a single button across multiple forms(using jqBootstrapValidation)? If it is possible, how can I do this?

TIA

Any ideas on how to fix this? Is this a bug maybe?

renierdbruyn avatar Dec 12 '13 11:12 renierdbruyn

I have the same problem, any solution?

netoec84 avatar Dec 15 '13 16:12 netoec84

I couldn't find a solution, but for the time being I am using jQuery validation plugin...

renierdbruyn avatar Dec 23 '13 07:12 renierdbruyn

does any one have a solution for this yes?

renierdbruyn avatar May 27 '14 08:05 renierdbruyn