MobileMe Posted August 6, 2009 Share Posted August 6, 2009 I have Auto Index running on my system. There is a form that is filled out by a registered user on the site. After they fill the form out they either press enter or click submit. I would like to add a feature where when they press enter or submit, a conformation screen pops up. Then they can click submit and the form is processed or click don't submit and it takes them back to the form to make corrections. Any suggestions would be helpful. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/169124-submit-conformation/ Share on other sites More sharing options...
mikesta707 Posted August 6, 2009 Share Posted August 6, 2009 You should use javascript to do that. Quote Link to comment https://forums.phpfreaks.com/topic/169124-submit-conformation/#findComment-892324 Share on other sites More sharing options...
Mardoxx Posted August 6, 2009 Share Posted August 6, 2009 <script language="JavaScript"> function confirmform() { var conf=confirm("do you _REALLY_ want to submit it?"); if (conf) return true ; else return false ; } </script> on your <form> tag add onsubmit="return confirmform()" eg <form action="index.php" onsubmit="return confirmform()"> Quote Link to comment https://forums.phpfreaks.com/topic/169124-submit-conformation/#findComment-892338 Share on other sites More sharing options...
yami007 Posted August 6, 2009 Share Posted August 6, 2009 it's easy, just this way simple : <input type="submit" name="submit" value="submit" onclick="return confirm('Are you sure you want to continue?');" /> Quote Link to comment https://forums.phpfreaks.com/topic/169124-submit-conformation/#findComment-892565 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.