-
ayraleeAsked on May 4, 2021 at 12:41 PM
is there a way to make unique id using condition in one form? for example there's two option type, A and B. if user choose A, the unique id will use A-001. and if user choose B, the unique id will use B-001
-
VincentJayReplied on May 4, 2021 at 4:09 PM
Hello,
You can pass the Unique ID data to your form field by following this guide: https://www.jotform.com/help/286-how-to-pass-field-value-to-another-field
Unfortunately, the unique ID won't change unless the form is submitted so there's no way it will show B-001 based on the user's answer.
Let us know if you need further assistance. Thank you!
-
ayralesyaReplied on May 4, 2021 at 10:39 PM
can you give me an example how to pass the unique id data to the form? because I still don't understand
-
Ariel JotForm SupportReplied on May 5, 2021 at 5:43 AM
The Unique ID widget only generates a value after submission, so you can't use it in Conditional Logic.
You should use the Random Value Generator widget instead.
The condition would look like so:
You may refer to the following guide for more related information: How to Pass Field Value to Another Field?
Here’s a demo form with the setup above applied: https://form.jotform.com/211242069390046. Feel free to clone the form and use it as you please.
If you need further assistance, please feel free to contact us.
-
Ariel JotForm SupportReplied on May 5, 2021 at 5:55 AM
Looks like I misunderstood your question.
I've updated the demo form to match your requirements.
The condition now looks like this:
Do the same for Type B.
If you need further assistance, let us know.
Related guide: How to Insert Text or Calculation Into a Field Using Conditional Logic
-
ayralesyaReplied on May 5, 2021 at 6:34 AM
thank you, I saw the demo form. but what I need is the id value without the random alphabet. is it possible to use only numbers (not random) and the numbers is sequential? (A-001, A-002, A-003, ...... or B-001, B-002, B-003, ....... )
-
Niko_NReplied on May 5, 2021 at 9:54 AM
Greetings,
You can change Allowed Characters to numbers from the widget's settings:
However, it's not possible to get the sequential numbers using the Random Value widget. That's only possible with the Unique ID widget, yet, as mentioned previously, the value of the Unique ID widget is generated by the back-end server once the form is submitted, so it's not possible to include its value within conditions.
Thank you!
-
newjobsReplied on May 10, 2021 at 2:20 AM
Is it possible to show UNIQUE ID WIDGET generated number as current status is hidden.
-
Ariel JotForm SupportReplied on May 10, 2021 at 4:41 AM
I am not sure if I have understood your question correctly, but if you're still referring to the Unique ID widget, then no. The widget only generates a value after submission. So you can't use the widget's value on the form.