All Collections
FAQs
Building πŸ‘·β€β™‚οΈ
Generate a reference number for each response
Generate a reference number for each response

Lets explore how you can generate and display a unique id for each form submission

Updated over a week ago

It is often be useful to display a unique identifier for each submission. This can easily be achieved using Team Forms calculated fields functionality. In this article we will show you step by step how to do this.

Unique Number

To generate and display a unique number for each for response you use custom JavasScript inside a calculated field as described below:

  1. Drag and drop a text field into your form

  2. Under the data tab, locate the "Custom Default Value" option

  3. Paste in the JavaScript expression into the field below to generate a random number

value = Math.floor(Math.random() * 10000)

Unique String

All submission are automatically assigned a unique string/text that Team Forms uses to reference responses. You can access this unique identifier using the javascript function TF_RESPONSE_ID(). To display this id in the form itself simply:

  1. Drag and drop a text field into your form

  2. Under the data tab, locate the "Custom Default Value" option

  3. Paste the below JavaScript expression into the field

value = TF_RESPONSE_ID()

Did this answer your question?