Are fields of type "id" auto-generated? #669
-
I am implementing forms, which allow the user to enter notices. However, I stumbled over fields of type For example if a field of type But where are those IDs generated? It seems not like the user has to enter those IDs, as at least some of the fields are hidden fields. Am I right, that fields of type |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Hello, you can have a look at the editor demo project.
And in notice-form.js we have the function: idFromFieldIdAndInstanceNumber |
Beta Was this translation helpful? Give feedback.
Hello, you can have a look at the editor demo project.
The back-end is in Java and the front-end is plain JavaScript, HTML and CSS.
It demonstrates how to build forms (most of it), we demo the generation of type "id" and "id-ref".
"id-ref" is indeed some kind of select in the UI and "id" is often generated and hidden.
https://github.com/OP-TED/eforms-notice-editor/blob/develop/src/main/resources/static/js/custom/notice-type-definition.js
And in notice-form.js we have the function: idFromFieldIdAndInstanceNumber