• 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: Auto-generated number (reference number)

Auto-generated number (reference number) 15 years 7 months ago #4907

Hey I would like an auto generated number (hidden field). This should a unique randomly generated number and viewable in the field submissions page. Any suggestions on how to go about this?
The administrator has disabled public write access.

Re:Auto-generated number (reference number) 15 years 6 months ago #5203

  • jmeyerdo
  • jmeyerdo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi!

I searched for this solution also. While creating a support-ticket I made another test - and found the solution:

You can add custom code to the value field: I added
//<code>
return date('omdHis') . 'x' . rand(1000,9999);
//</code>
to get an application-id started with the date with added \"x\" and 4 other digits, i.e. \"20081022144600x6975\".

It seems that you can use any php-syntax to generate your number via this way.

Best regards, Jens

P.S.: tested with RSform!Pro only.

Post edited by: jmeyerdo, at: 2008/10/22 14:50<br><br>Post edited by: jmeyerdo, at: 2008/10/22 14:51
The administrator has disabled public write access.

Re:Auto-generated number (reference number) 15 years 6 months ago #5236

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

Thank you for your contribution. Another great way to generate a unique reference number is by using PHP's time() function which will generate the number of seconds passed since 01.01.1970
//&lt;code&gt;
return time();
//&lt;/code&gt;
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:Auto-generated number (reference number) 15 years 6 months ago #5242

  • jmeyerdo
  • jmeyerdo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Ah, of course...

I am using this id as filename for download also and added the additional string to make the filename more secure/unique.

But anyway: It is great that RSform supports this features with a high flexibility.

Best regards, Jens
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!