Refresh twitter bootstrap form wizards after submit

I need to refresh a form wizard after submit to avoid page reload. I’m using the plugin twitter bootstrap form wizard So far I’ve tried with form.reset(); and $(“#wizard”).load(location.href + " #wizard");

Both methods don’t seem to work, in the first case the form is cleared but doesn’t take me to the first step of the form, in the second case it takes me to the first step but the wizard is not loaded and show me the submit button even if i’m still on step one. I haven’t post the code because iq uite long as i’m using jquery validator as well, but I can post it if required.

Many thanks

Hi @vincekaribusana, loading the same page again (and replacing some HTML with the very same HTML) just to destroy the form wizard of it is certainly not the solution. There’s an example on the wizard page suggesting to trigger a click event on the first tab:

1 Like

Hi @m3g4p0p and thanks for your reply. I’ve manged to make it work, I was firing ajax from jquery validator, after I moved it inside $(‘#rootwizard .finish’).click(function() {…} it worked adding the following in the ajax success:

// Show first step of the wizard
$(‘#newuser_wizard a[href=“#tab1”]’).tab(‘show’);

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.