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: 23
Joined: Mon Jan 18, 2016 7:58 am

Referance Number

Post by Warrenr » Mon Jul 24, 2017 10:15 am

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: 2150
Joined: Tue Nov 04, 2008 12:08 pm

Re: Referance Number

Post by [RZ] » Mon Jul 24, 2017 10:17 am

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: 23
Joined: Mon Jan 18, 2016 7:58 am

Re: Referance Number

Post by Warrenr » Mon Jul 24, 2017 10:33 am

I need it to generate it when the form isa displayed?

User avatar
[RZ]
 
 
Posts: 2150
Joined: Tue Nov 04, 2008 12:08 pm

Re: Referance Number

Post by [RZ] » Mon Jul 24, 2017 10:36 am

it depends on the script, what you want to accomplish, how that script behaves, etc and more etc...

User avatar
BaconFries
 
 
Posts: 4189
Joined: Thu Aug 16, 2007 7:32 pm

Re: Referance Number

Post by BaconFries » Mon Jul 24, 2017 10:41 am

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

User avatar
Hurtado
 
 
Posts: 449
Joined: Sun Nov 04, 2012 12:02 pm
Location: Valladolid
Contact:

Re: Referance Number

Post by Hurtado » Mon Jul 24, 2017 11:33 am

Use JS

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests