Hello,
I would like to limit the re-submission of a form to every 5 minutes to a registered user. I do not find it in Watchman. How can I achieve this ? In V5 this facility was available, I cannot find it in V7.
Please help
I would like to limit the re-submission of a form to every 5 minutes to a registered user. I do not find it in Watchman. How can I achieve this ? In V5 this facility was available, I cannot find it in V7.
Please help
Hi Ronn,
Yes, this feature is not supported at the moment, may be added in a future update, but you can do it in a PHP action and use the "Events" behavior to redirect the user if the condition fails!
Yes, this feature is not supported at the moment, may be added in a future update, but you can do it in a PHP action and use the "Events" behavior to redirect the user if the condition fails!
PHP > Advanced settings > Events
Hello Max.
I am trying this in a PHP Action.. Bet it does not seem to work. Where possibly I maybe going wrong ?
Please help.
Thanks
I am trying this in a PHP Action.. Bet it does not seem to work. Where possibly I maybe going wrong ?
if (time() - ( isset($_SESSION['last_submit'])?$_SESSION['last_submit']:0 )< 300)
die('<h1><center>Post limit exceeded. Please wait at least 5 minutes</center></h1>');
/* ======= update the session ======== */
$_SESSION['last_submit'] = time();
Please help.
Thanks
code needs testing, but it should be like this:
Check if session key exists, no ? set it and return 0, yes ? check the time difference and return "redirect" if it's less than 300
then enable the Events behavior, add a new event and call it "redirect" then redirect the user somewhere or display a message!
Check if session key exists, no ? set it and return 0, yes ? check the time difference and return "redirect" if it's less than 300
then enable the Events behavior, add a new event and call it "redirect" then redirect the user somewhere or display a message!
You need to login to be able to post a reply.