Referance Number

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
Warrenr
 
 
Posts: 17
Joined: Mon Jan 18, 2016 7:58 am

Referance Number

Post by Warrenr »

What would be the easiest way to add a unique reference number on a form. It does not have to be sequential, I was thinking of the date and time as one long text ie 20170724121545??
User avatar
[RZ]
 
 
Posts: 1914
Joined: Tue Nov 04, 2008 12:08 pm

Re: Referance Number

Post by [RZ] »

there is no problem at all, just do not forget to add an alphabetic prefix like "frm1234567890" to make the id/name valid (i'm assuming that for reference you are meaning a name or an id)
Warrenr
 
 
Posts: 17
Joined: Mon Jan 18, 2016 7:58 am

Re: Referance Number

Post by Warrenr »

I need it to generate it when the form isa displayed?
User avatar
[RZ]
 
 
Posts: 1914
Joined: Tue Nov 04, 2008 12:08 pm

Re: Referance Number

Post by [RZ] »

it depends on the script, what you want to accomplish, how that script behaves, etc and more etc...
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Referance Number

Post by BaconFries »

If you are meaning a unique number will be generated for each user who uses or fills the form then yes it is possible but will require programming such as PHP.
The webshop in WWB has such a feature which generates a unique order number maybe viewing the tutorial will be helpful?
http://wysiwygwebbuilder.com/webshop.html
Or if you understand PHP you could use echo to generate a unique number by using echo uniqid();. Note these are pointers for your information only for how it can be done and not support.
Example of using unique(); refresh the page to see in action.
unique
Post Reply