Control of bootstrap tabs

Asked

Viewed 788 times

0

I have three tabs with bootstrap, the option to navigate the tabs with the buttons back and next are working, as picture below: inserir a descrição da imagem aqui

How do I enable the next tab only if all fields of the first tab are filled in the same way in the second tab and leave the last two tabs as disabled by default when the first tab is active?

  • can traverse all inputs with jquery, $('.input-client'). each();

  • 1

    You can disable the button Próximo, and only enable when all fields are filled in. Hence you link this button on the other tab, and so on... And on the tab link (Preferências do cliente for example) you put "#" in the href, which is not to go to tab clicking there. You can do it with jQuery or pure Javascript... put the code there that you should get the answer you’re looking for quickly. In time: tbm is only possible to enable the tab link when fields are filled in.

  • The most complicated I think is if you want to validate all fields, because each one will have the specific rules, but if for example you just want to know if there has been modification in all fields, you can use the function change or one to check if all fields have been changed...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.