• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Limit times submissions per member and per day

Limit times submissions per member and per day 12 years 6 months ago #15243

  • simbian
  • simbian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
I seen on examples www.joomla-form.com/form-examples allow only registered users to make submissions and to limit submissions.

I would know if it's possible to do a combination of both, i need a form that can be accessible only by registered users and with a limit number of submissions.

I also would like to know if i can set an expiration date. I mean that each mmeber could do for example max 1 upload per day, then a warning display a message to come back tomorrow for a new upload. The form will be disabled if he tries to do more than one submission in the same day, and the next day it should become back availble.

Is this possible or too complex?

Thanks, Simone
The administrator has disabled public write access.

Re: Limit times submissions per member and per day 12 years 6 months ago #15270

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

Yes this is possible. You will have to use a script placed in the Scripts called on form display area that will make some verifications. Example:
$db = & JFactory::getDBO();
$today = date("Y-m-d");
$rsip =$_SERVER['REMOTE_ADDR'];
$db->setQuery("SELECT COUNT(`SubmissionId`) FROM #__rsform_submissions WHERE `FormId`='your_form_id_here' AND `DateSubmitted` LIKE '".$today." %' AND `UserIp` = '".$rsip."'");
$submissions = $db->loadResult();
if ( $submissions > 0)
	$formLayout = 'You cannot submit again.';
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re: Limit times submissions per member and per day 12 years 6 months ago #15296

  • simbian
  • simbian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
thanks a lot Alexp, i will try it soon as possible and see if it works fine!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!