TOPIC:

Limit submission per IP not working 2 years 8 months ago #224864

  • Topic Author
  • baggio
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Hi,

I followed the guide at this link:
crosstec.org/en/support/online-documenta...-of-submissions.html

THE CODE ADDED IN THE PIECE BEFORE THE FORM IS THIS:

$ip=$_SERVER;;
$db = JFactory::getDBO();
$db->setQuery("Select count(id) From #__facileforms_records Where ip ='".$ip."' and form = 15");
if( $db->loadResult() > 2 ){
// replace index.php with the url to an article explaining that the max. amount has been reached
header("Location: www.robertobaggio.com ");
exit;
}


After the submission the user is correctly redirected to www.robertobaggio.com , but when i go to "managed records" unfortunately i see that the submission has been recorded, and moreover the submitter receives the notification as well as the admins.......

Any help?

Thanks,

Baggio

Please Log in or Create an account to join the conversation.

Limit submission per IP not working 2 years 8 months ago #224871

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 279
Hello Baggio,

the script works in the following way:
If the user hasn't reached the limit, he will be able to submit the form. His data is going to be saved in the database and the depending emails are going to be sent out.
If the user has reached the limit, he will be instantly redirected to the specified webpage, without the opportunity to submit any values. This is not the behavior you're experiencing?

Also, you're missing a part of the code. The first line should look like this:
$ip=$_SERVER['REMOTE_ADDR'];

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!

Please Log in or Create an account to join the conversation.

Last edit: Post by marko.bosnjak.

Limit submission per IP not working 2 years 8 months ago #224922

  • Topic Author
  • baggio
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Dear Marko,

unfortunately the script is not working as it should.
I already added the first line of the code, sorry I lost it here in the copy/paste.
The limit is set to 2, but this is what happen at the third submission:

- He get redirected to the page where are explained the reasons of such limit (this step is the only one that work as it should)
- Such submission unfortunately get recorded in the "managed records".
- Such submission unfortunately get emailed to the user and to the admins
- The form is displayed in a module, hosted in the home page and the contact page. From the third submission on, the user won't be able any more to access the home page and the contact page because he will be redirected to the page where are explained the reasons of the limit!

So, at this stage, my question is. There is any script that, once the limited is reached, can simply show a message in the module (replacing the original form) and say "Hey, you reached the limit", instead of making the home page unaccessible?

You know the thanks message that appears in the module after the submission. When you get the limit, a similar message could stay there, always, even the user refresh, in order to making impossibile a new submission.

If you have any more ideas please let me know,

Thanks,

Best,

Robbie Baggio

Please Log in or Create an account to join the conversation.

Limit submission per IP not working 2 years 8 months ago #224932

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 279
Hey Robbie,

that's a very strange behavior, because when the limit is reached, users should be automatically redirected to the specified page. They shouldn't access the form at all, meaning there shouldn't be any submissions or email sending.

You have a thank you page. Perhaps that's the problem. Could you turn it off and see if it'll make a difference?

Would you be willing to provide backend access (Joomla Super User) so I can test it directly? If so, send the info to support@crosstec.org and notify me here when you send it out.

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!

Please Log in or Create an account to join the conversation.

Limit submission per IP not working 2 years 8 months ago #224934

  • Topic Author
  • baggio
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Hi Marco,

I email you, please let me know,

Thanks,

Best,

Robbie Baggio

Please Log in or Create an account to join the conversation.

Limit submission per IP not working 2 years 8 months ago #224966

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 279
Resolved via email.

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!