Jump to content

Use Submit button to return to previous form


DouglasMcKibbin

Recommended Posts

How do I code a submit button to enter data and return to the previous form with the previous form's data still showing? I have tried without success ...<INPUT type="submit" value="Submit Form" style="color: black ; font-size : 12pt ; font-weight : bold" onClick="history.go(-1);return true;"> <INPUT TYPE="button" VALUE="Back to Entry Form" style="color: black ; font-size : 12pt ; font-weight : bold" onClick="history.go(-1);return true;">

 

and

 

<INPUT type="submit" value="Submit Form" style="color: black ; font-size : 12pt ; font-weight : bold" onSubmit="history.go(-1);return true;"> <INPUT TYPE="button" VALUE="Back to Entry Form" style="color: black ; font-size : 12pt ; font-weight : bold" onClick="history.go(-1);return true;"> The "Back to Entry Form" button does return to the previous entry form with intact data.Thank you,Douglas McKibbin

Link to comment
Share on other sites

Because it works in one instance …. when a Button is clicked …. and not in another when submit is clicked.

 

Look at "Return Patient Entry form" at Augustasurgery.org. Enter some info and go to the bottom of the page, read the financial agreement, enter a fictitious name and date, then click Submit. You do not go back to the Return Patient Entry form, But ….

 

If you do the same thing all over again on the Return Patient Entry form but this time instead of going to the Financial agreement form you go to the HIPPA form, you can and do go back to the Return Patient Entry form showing data you had previously entered. The difference being perhaps returning from a page with no data entry and a page with data entry.

Link to comment
Share on other sites

How do I code a submit button to enter data and return to the previous form with the previous form's data still showing? I have tried without success ...

 

You can use an Ajax submission so that you never leave the page or the server-code can pass the form data back so that the form fields can be restored.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...