What is the difference between presetValue (fields.json)and _presetValue(ntds)? #1178
-
We have noticed that there is the attribute presetValue both in fields.json and in the notice-type-definitons (with _). Why is that? For example in subtype 16, the presetValue from the NTD corresponds exactly to the value that has already been defined in fields.json. The fields concerned are listed below:
In the interests of simplification, the presetValue should only be defined in one place. If it is necessary to overwrite the value in individual NTDs, this should only be done if the value is different. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
See the section "Property names starting with underscore" towards the bottom of the documentation page at https://docs.ted.europa.eu/eforms/latest/notice-types/index.html In short: "_presetValue" is in the NTD for your convenience, so that you don't have to look it up from fields.json. |
Beta Was this translation helpful? Give feedback.
See the section "Property names starting with underscore" towards the bottom of the documentation page at https://docs.ted.europa.eu/eforms/latest/notice-types/index.html
In short: "_presetValue" is in the NTD for your convenience, so that you don't have to look it up from fields.json.
The value will never be different from the one in fields.json, it comes from the same source (same column in our database).