• 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 the number of submissions per form

Limit the number of submissions per form 5 years 7 months ago #38484

  • info5870
  • info5870's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Hello

I need to limit the number of submissions per form, for this I'm using the following script:

__________________________________________________________________>>

Script called on form display

/*THIS SCRIPT LIMITS SUBMISSIONS TO 10*/
$submissions = @mysql_result(mysql_query("SELECT COUNT(`SubmissionId`) FROM ".$RSadapter->tbl_rsform_submissions." WHERE `formId`='".$formId."'"),0);
if (intval($submissions) >= 10)
{
//the formLayout variable contains all the form output. let's overwrite it
$formLayout = '<font color="red">Sorry, no more submissions are accepted !</font>';
}

/*LET'S DISPLAY THE NUMBER OF CURRENT SUBMISSIONS*/
/*YOU CAN DELETE THIS LINE, IF YOU DON'T NEED IT*/
$formLayout .= 'Current number of submissions: '.mysql_result(mysql_query("SELECT COUNT(`SubmissionId`) FROM ".$RSadapter->tbl_rsform_submissions." WHERE `formId`='".$formId."'"),0);
$formLayout .= ' (10)';


Script called on form process

$submissions = @mysql_result(mysql_query("SELECT COUNT(`SubmissionId`) FROM ".$RSadapter->tbl_rsform_submissions." WHERE `formId`='".$formId."'"),0);
if (intval($submissions) >= 10)
{
//If you are showing the form inside an article, replace the link below with the article link
$redirectLink = 'index.php?option=com_rsform&formId='.$formId;
$RSadapter->redirect($redirectLink,'Sorry, no more submissions are accepted !');

____________________________________________________________>>

When I save the changes, a strange screen appear, and the changes are not saved :-(

You can see the strange screen after save here www.jesussuarez.com/error-rsform.png

What happend? Please, I need your help
Thank you very much and Best regards :-)
The administrator has disabled public write access.

Limit the number of submissions per form 5 years 7 months ago #38485

  • info5870
  • info5870's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Please, I need your reply urgently

Thank you very much
The administrator has disabled public write access.

Limit the number of submissions per form 5 years 7 months ago #38486

  • info5870
  • info5870's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
The staff of RS FORMS send me the next URL. I post here in case someone needs it ;-)

www.rsjoomla.com/support/documentation/r...for-submissions.html

Best regards
The administrator has disabled public write access.
The following user(s) said Thank You: jami
  • 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!