- emilevdendeAsked on January 21, 2015 at 05:35 AM
I was wondering how the widget "Hidden box" composes the unique ID. The actual implementation is not really interesting for me, but I am wondering if this box REALLY generates a globally unique ID.
Can someone tell me that?
- SeanAnswered on January 21, 2015 at 10:03 AM
If I understood you clearly, you would like to know how is it that the "Hidden Box" unique ID is being generated by our system. Like all other fields on your form, when a hidden Box ID is assigned, it is based on the number of related fields on that form.
Lets put it this way, if you add a single Hidden Box field on your form it would be assigned to an ID #hidden_N (the N would represent a digit from 1 to infinite). So lets say the ID #hidden_1 would be assigned to the first hidden field you added to your form but if you duplicate that field, the newly added field would be assigned the ID #hidden_2 since the ID #hidden_1 was already assigned to a field within the form.
All IDs assigned to a field within a form is considered "Local IDs" for that form. Therefore all fields within the form will store or pull information from that field easily. If you would like to access the contents of that hidden field you would have to pass the information via the URL. So if you are worried about storing contents in someone else's hidden field, you don't have to worry about it :).
I hope this answers your question. Feel free to ask for additional assistance if needed.
- SeanAnswered on January 21, 2015 at 10:20 AM
Base on the explanation above, take a look at the IDs assigned to these two hidden box fields added to a single form.
I hope the graphics helped with the explanation.
- emilevdendeAnswered on January 21, 2015 at 10:22 AM
Thanks for your explanation! But this is not what I'm talking about :)
My question is about the contents of the box once it's been used by a used submitting information with the form...
The ID that's being generated, how is that generated? Is it just random? In which case it could happen that it does not return a unique value each time.
Do you know that? I just want to make sure that this value is used only once per submission, really once :)
- KadeJMAnswered on January 21, 2015 at 11:24 AM
The unique id is actually not random as it is more based on assigned values which therefore sets it up to increment based on the settings you apply to the widget. Technically speaking it's Chronological only.
If you're seeking to have something that is more randomized and far less predictable then I would suggest switching to our Random Value Generator Widget.
Both Widgets either way don't apply the same value so they are always different in your submissions.
- emilevdendeAnswered on January 25, 2015 at 03:21 PM
Ok, thanks KadeJM.
- JotForm SupportjonathanAnswered on January 25, 2015 at 05:45 PM
Please let us know if there is more we can assist you with.