How to create a unique random number after form submission?

gu guga06 15 Feb, 2020
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 !!!
Max_admin Max_admin 16 Feb, 2020
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gu guga06 24 Feb, 2020
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 !
he healyhatman 24 Feb, 2020
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.
This topic is locked and no more replies can be posted.