Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

RSForm!Pro - Adding a counter for submissions

Adding a counter for submissions

In this article we will describe how to create a submission counter and displaying it in the "Thank you page".

  1. Create a new hidden field, name it "counter";

  2. In the Default value, paste the following code (please remember to copy everything, including the //<code> tags!):

  3.  
    //<code>
      $db = JFactory::getDbo();
      $db->setQuery("SELECT COUNT(`SubmissionId`) FROM #__rsform_submissions WHERE FormId='".(int) $formId."'");
      return $db->loadResult()+1;
    //</code>
     

    Note: To display the result please edit your "Thank you message" and add the following:
    You are submitter number: {counter:value}

Feedback