Refreshing Problem

draglung 31 Jul, 2008
Hi,

When we refresh the page the same form gets submitted again. There will be double submission. Is there a way we can prevent this?

Thank you
Max_admin 31 Jul, 2008
Hi, if you refresh the submit page yes, actually if you did the same at any billing webpage you will be billed again !🙂
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 31 Jul, 2008
Hi draglung,

That's true - FireFox usually asks me if I want to resubmit the data again - but it may not be clear to users what that means.

If this is a major problem for you then you can put use some kind of server side verification. Maybe use an id code in the form, or a cookie, or just check the name and email to make sure that they are unique.

Bob
draglung 31 Jul, 2008
Hi,

Thanks for the prompt reply.. Actually im quite new to php so can I ask where can i insert the code? Issit possible to key in the code anywhr in Chrono forms to do the same thing?

I saw some suggest a md5 code or sth but im not sure how to do it..

Thanks
draglung 01 Aug, 2008
Hi,

I tried this code:
<?php
$oldkey = md5(uniqid());
$hashkey = $oldkey;
?>
in FormHTML

And then I added
<?php
$hashkey = md5(uniqid());
?>
OnSubmit code after sending email

Now I need a check to verify
if($hashkey==$oldkey)Stop the form submission
if the user refresh the page.

But im not sure where to insert the check and how can I stop the form from submitting and return an error message
Max_admin 01 Aug, 2008

Hi,

I tried this code:
<?php
$oldkey = md5(uniqid());
$hashkey = $oldkey;
?>
in FormHTML

And then I added
<?php
$hashkey = md5(uniqid());
?>
OnSubmit code after sending email

Now I need a check to verify
if($hashkey==$oldkey)Stop the form submission
if the user refresh the page.

But im not sure where to insert the check and how can I stop the form from submitting and return an error message



Hi draglung,

yes, you will need to hack chronocontact.php at the beginning of the upload function to stop the submission at its start, do you have J1.5 ? if so then better wait for the next version of Chronoforms (95% this weekend), it will come with server side validation (this is done) so you don't need to hack! you just add this check on the validation box and it will work!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 01 Aug, 2008
Or if I got time, I will add a submissions limit per time per user feature!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
draglung 01 Aug, 2008
Hi,

Thanks so much for the wonderful releases. I shall wait for it.

The trying part was fun though.

Im using Joomla 1.5.

Regards
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger