Default value: Should it appear in the template? #11236
-
Hi, I have a field that conditionally hides if another field's value does not match a certain condition. The hidden field has a default value. Now if the field is hidden and the page saved, Statamic puts a Is this a bug or a feature? My understanding is that a default value should only populate an empty field in the CMS, if it is loaded the first time. Normally, such default values don't get to the template if the field is empty (in this case The behavior I encountered confused me. 😆 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Default values are available in the template now, regardless of if they're in the data. That change was made a while back. |
Beta Was this translation helpful? Give feedback.
Default values are available in the template now, regardless of if they're in the data. That change was made a while back.