TOPIC:

How can I make a form submit once per user only 4 years 1 month ago #178010

  • Topic Author
  • dontregartha
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
I need to have a voting form where a user goes to the site, enters their email, name and address and selects from a drop down selection, a restaurant they are voting for.
Because this list is likely to be quite long, I can't really use a polling tool.

Can I get the form to validate against the database so it only allows a user to vote ONCE only?

This would be better than reduplicating the database after the voting closes.

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

How can I make a form submit once per user only 4 years 1 month ago #178012

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Hello,

You can find out more about what you want to achive in this article : crosstec.org/en/support/online-documenta...-of-submissions.html

Let us know if this worked for you.

Regards,

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

How can I make a form submit once per user only 4 years 1 month ago #178013

  • Topic Author
  • dontregartha
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
Thanks Mario - that seems like the answer - I shall try that this afternoon

Thanks for the speedy response.

Don

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

How can I make a form submit once per user only 4 years 1 month ago #178015

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Hello,

That's great !! :)

Let us know if you need more assistance.

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

How can I make a form submit once per user only 4 years 2 weeks ago #179140

  • Topic Author
  • dontregartha
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
Ok I used the second option in the article and it worked perfectly. Except it uses the IP address so users behind a Corporate Proxy server can't use the form if someone in the network has already used it.

The first option - how is that working? is this a session cookie? Its just that I can't test it as it is saying I've already submitted.

Is there any way of resetting my browser - I've used up my attempts on Safari, Chrome and Firefox here!

It also doesn't work via browserstack on their remote system.

Your log ins are valid on both the live site (the vote once script is disabled here) britainsbestcafe.co.uk

and the staging site ( temp.britainsbestcafe.com )

Hope you can help

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

How can I make a form submit once per user only 4 years 2 weeks ago #179164

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Hello,

This is not a cookie session, that's why cleaning browser cache won't do.
This is stored in your DB under #_facileforms_records, and if there is submission from that IP it redirects you to your "index.php?option=com_content&view=article&id=9" .

If your users are registrated users, you can limit the submission (1) per user, as it's shown in the example no.3 ?

$user = JFactory::getUser();
$db = JFactory::getDbo();
$db->setQuery('SELECT COUNT(id) FROM #__facileforms_records WHERE user_id ="'.$user->id.'" AND form = 999');
$db->loadResult();
if($db->loadResult() > 0){
  // replace index.php with the url to an article explaining that the max. amount has been reached
  header("Location: https://crosstec.org/en/");
  exit;
}

Let us know if this helped.

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

Last edit: Post by MarioPuco.
Moderators: ForumSupport
Time to create page: 0.055 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!