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. 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. 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()"> 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?');" /> Link to comment https://forums.phpfreaks.com/topic/169124-submit-conformation/#findComment-892565 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.