Can JotForm automatically generate a unique number and save it to a separate field?

  • Profile Image
    Robb Auspitz 
    Asked on November 20, 2016 at 06:06 PM

    My client wants to create a membership intake form for a "VIP Club." She would like the form to automatically generate a unique membership number and save it to a field that would be labeled "membership ID", or something similar. Can this be done with JotForm? Many thanks for your help!

    Sincerely,

    Robb Auspitz

     

  • Profile Image
    liyam
    Answered on November 20, 2016 at 09:41 PM

    Hello Robb,

    You can add this Unique ID widget in your form to create a unique ID: https://widgets.jotform.com/widget/autoincrement

    This guide will also give you more information on how to use the field: https://www.jotform.com/help/79-How-to-Add-Custom-Unique-IDs-to-your-Form-Submissions

    If you have questions, please let us know.

    Thanks.

  • Profile Image
    AA_C
    Answered on November 20, 2016 at 10:13 PM

    I think your looking for a random number generator.

    You might want to try some simple java script to do what you want like;

    This example creates a 5 or 6 digit number.

    <html>

    <body>

    <p>Click the button to display a random number </p>

    <button onclick="myFunction()">Try it</button>

    <p id="mynumber"></p>

    <script>

    function myFunction() {

        var x = document.getElementById("mynumber")

        x.innerHTML = Math.floor((Math.random() *900000) + 10000);

    }

    </script>

    </body>

    </html>

     

    Robert