Buy Now
Sign in

How to create a unique random number after form submission?

guga06 , February 15 2020, 13:21
G
guga06 2
February 15 2020, 13:21 #391191
Dear all,
I want to do a RMA form, so when a customer needs to return a faulty product, completes the form and our company receives the formulaire.
So far, so good.
I also need that, once RMA form is submitted, an unique number be assigned to that request...
So our customer receives an email like: "Your RMA number is XXXXXX, please write it at every product you send".
And our Technical Department receives an email like "Customer XX has created an RMA and the following number was assigned XXXXXX".
I can do the form, all good, but have no clue on how to generate random number to suit this application.
I'm using ChronoForms6.
Thanks in advance !!!
admin 29
February 16 2020, 00:20 #391195
You can generate a random number with the {rand:} shortcode, but, you will need to store this number in a variable using the "data builder" action, then call it later in any place you need using the {var:var_name} shortcode, you better store it in the database table as well!
Best regards
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
G
guga06 2
February 24 2020, 01:36 #391352
Dear Max,
Thanks a lot for your kind answer.
Is there any guide or document to achieve my request?
I'm new with Chronoforms, so the "data builder" action and even the database set is something that still is not familiar to me.
Again, many thanks in advance !
healyhatman 9
February 24 2020, 04:20 #391353
There's a database read / save demo form.
As for the data builder action, just have a look at it and see how you go.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store