• 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 number of submission

Limit number of submission 16 years 5 months ago #5280

Hello
I want to limit the number of submission to 50 and then show a message to the next submission.

Also is it possible to show on the same page the number of submission left (50 - 1, 49 - 1, 48 - 1...) to the users everytime someone submit ?

Thank you!
Alex
The administrator has disabled public write access.

Re:Limit number of submission 16 years 5 months ago #5434

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

You can use a textbox with an additional attribute: readonly=\"readonly\"
In the default value field, insert this code:
//<code>
global $database;
$database->setQuery(\"SELECT COUNT(`SubmissionId`) FROM #__RSFORM_SUBMISSIONS WHERE `formId`='3'\");
$database->query();
return (50 - intval($database->loadResult()));
//</code>

In the Scripts tab, paste this code in the script called on form display area:
global $database;
$database->setQuery(\"SELECT COUNT(`SubmissionId`) FROM #__RSFORM_SUBMISSIONS WHERE `formId`='3'\");
$database->query();
if (intval($database->loadResult()) >= 50)
{
 echo 'Sorry, no more submissions are accepted !';
 $formLayout = '';
}

Remember to replace formId (in our case, 3) with your own form id !<br><br>Post edited by: strafe, at: 2008/11/05 12:04
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 number of submission 16 years 4 months ago #5729

  • matt
  • matt's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 136
  • Thank you received: 14
Hi!

I have been looking for this solution. But I can't make it work for me, just the code are shown in the field . I'm using RSform lite and Joomla 1.0.15.

Thanks!
Matt
The administrator has disabled public write access.

Re:Limit number of submission 16 years 4 months ago #5739

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

This code is form RSform! Pro only.
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 number of submission 16 years 4 months ago #5744

  • hrr.nu
  • hrr.nu's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hello here!

I have the same problem, only different situation; my situation:

We use (atm) one form: for example : form1 with:

Name - Email address - Date

Name and Email address = textbox

\"Date\" is an radio / checkbox (single selection). (what is better for this action, radio? or checkbox?

So we have :

Name [_____________]
Email [_____________]
Date [option 1]
[option 2]
[option 3]

Now we want: option1 - > only 30 submissions; if it is more than 30 then - > FULL ; Same for option 2 and 3

Is this possible? Or do we need to go to multiple forms? (not really an option..)

btw after period of time we say : option 1 - > option 4, and option 1 is then gone..
The administrator has disabled public write access.

Re:Limit number of submission 16 years 4 months ago #5748

I had a thread removed or moved....? I just want to know how to make a single submission of a form. This sounds like it's somewhat the same thing I want to do but only want one submission.
The administrator has disabled public write access.

Re:Limit number of submission 16 years 4 months ago #5942

  • proexe
  • proexe's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
I have tried this as need to limit a number of forms however getting this code when saving the textbox

Fatal error: Call to a member function setQuery() on a non-object in routetowebsite\components\com_rsform\controller\functions.php(34) : eval()'d code on line 3

any thoughts on this issue.

I have changed the formid number to the one I have created

Kind Regards

Stewart Shram
The administrator has disabled public write access.

Re:Limit number of submission 16 years 3 months ago #6014

I'm still having trouble as well. Although RSform is helping try to resolve through tickets. I'll post if I get it to work.
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!