I have a few tabs in a tab panel with similar forms. How do I prevent going to the next tab unless the previous tab is correctly filled? Thanks.
I think your approach is not the best, if you want to create a wizard you should probably use the cardlayout .
If you really want to stick with your current approach, I would hook the beforetabchange
event and cancel the event if the form are not valid.
ie
tabpanel.on('beforetabchange', function(tb,newtab,oldtab){
// insert your validation here
// if the user cannot go here
return false; // would prevent the change of tab
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.