Jump to content

Recommended Posts

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

<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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.