I am using jquery FormWizard and would like to use the submit button on the last screen as a way to submit the form and go to the next screen.
The problem is that I am embedding this jquery script in my Java code. Right now, I have a submit button from the jquery form wizard, and I have a continue button from my Java code. Therefore, the user submits the form by clicking "submit" and then click "continue" to go to the next screen. Not an ideal situation for the user.
If I just use "continue" without clicking the "Submit" button, it does not save the form information. When I click submit and then continue , all the form information will be saved in the database. How can I use the continue button as a send, and also go to the next screen so that I don’t need the send button on the last screen.
Script sc = new Script();
sc.add("$(function(){$('#formScreenQuestions').formwizard({formPluginEnabled: true,validationEnabled: true,focusFirstInput : true,disableUIStyles : true});});");
HEADER.add(sc);
Form form = new Form("criteria");
form.set(ID, "formScreenQuestions");
Div dh = new Div();
dh.set(ID, "lastStep");
dh.set(CLASS,"step");
Table vt = new Table();
vt.row();
vt.cell(text("Please press SUBMIT before pressing CONTINUE"));
==== showing some questions with checkboxes to select =====
dh.add(vt);
Div db = new Div();
db.set(ID,"navigation");
Table bt = new Table();
bt.row();
bt.cell("<input type='reset',id='back',value='Back' />");
bt.cell("<input type='submit',id='next',value='Next' />");
db.add(bt);
form.add(dv);
form.add(db);
source
share