0

I have some doubts in form submission.
The function that i need is adding a prompt dialog box to confirm befor the user submits the form.
Eg: The user is entering some data in the form and he clicks submit..a dialog box appears and says " Are you sure you want to submit the form"
If "yes" the form is submitted, else "no" it goes back to the page where he was befor the prompt dialog box appear..

How can this be implemented in php, html..? or is there anything can do with javascript also...

Thanks for your effort..

Tryphy..

2
Contributors
2
Replies
6
Views
7 Years
Discussion Span
Last Post by tryphy
0

yes there is a way, but its easier with javascript
the key is the "return confirm"

<form action="something.php" onSubmit="return confirm('Are you sure?');" method="post">
// Fields
// Fields
<input type="submit" name="Submit" class="button" value="Submit">
</form>

I hope this helps

0

yes there is a way, but its easier with javascript
the key is the "return confirm"

<form action="something.php" onSubmit="return confirm('Are you sure?');" method="post">
// Fields
// Fields
<input type="submit" name="Submit" class="button" value="Submit">
</form>

I hope this helps

Hey thanks,

Yah i used Javascript to solve it..
:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.