Comments (4)
Hi,
I assume that you are sending the form using ajax? If so, you can use the success callback function to take care of hiding the wizard and showing a success message (and close button). If you specifically need to show another step in the wizard when the form is successfully posted, just call e.g. $("#demoForm").formwizard("show", "success_step"); in the success callback.
e.g.
$(function(){
$("#demoForm").formwizard({
formPluginEnabled: true,
validationEnabled: true,
focusFirstInput : true,
formOptions :{
success: function(data){
$("#demoForm").formwizard("show", "success_step");
},
beforeSubmit: function(data){$("#data").html("data sent to the server: " + $.param(data));},
dataType: 'json',
resetForm: true
}
}
);
});
You can probably find suitable documentation for the show method etc at http://thecodemine.org/
Would this work for you?
from formwizard.
Thanks for the quick reply! Yes I'm posting the form with ajax on each step. In the final step I summarise the form then submit it.
I would like to show a 'success_step' after submitting the form. I've tried your method above but, the formwizard counts the 'success_step' as the last step of the form and thus renders the submit button in the 'success_step' and not the step before.
from formwizard.
Hi,
try adding the class="submit_step" to the step that should submit the form (thus the last step before the success_step)
Hope this should take care of it.
from formwizard.
Yes this worked. Thank you very much!
from formwizard.
Related Issues (20)
- Preview HOT 10
- in/out animation breaks formatting in IE8 HOT 2
- Success option: no response data from server HOT 1
- Form wizard submitting without displaying all steps after closing it first time HOT 1
- Option to submit & complete form at multiple steps (with button). HOT 1
- formOptions stopped working after jQuery upgrade 1.8.2 to 1.9.0 HOT 2
- Form wizard behaving strangely, clicking on next buttons submit form instead of showing the next step. HOT 2
- There is a way to get the data string before press "submit" HOT 1
- Close wizard after submit HOT 1
- Submit Form using Form Plugin on Last Step Before Shown Event HOT 2
- Event when loaded? HOT 1
- maybe an issue on 'focusFirstInput' option action
- Licence HOT 1
- Formwizard documentation HOT 1
- http://thecodemine.org seems to be compromised HOT 1
- Fileuploads not working
- Prevent .show if current step is not valid
- Next doesn't work right if sibling elements are present that do not match ".step" HOT 1
- Cannot add checkboxes or radio inputs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formwizard.