You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving a 4.x Form blueprint in 5.x strips out configuration properties when their value is the default value - see #9685
For example setting the Visibility of a field to be visible results in the visibility property being removed from the Blueprint YAML. Setting it to Read Only correctly saves it as readonly.
However when looking at the fields output within Antlers on the front end, these missing properties (i.e. visibility: visible) are no longer included.
Another PR was made that adjusted this for field config (#9010) however does not seem to apply to frontend forms.
This is a Statamic 5 install, with a Form blueprint from Statamic 4
View the site in the front end
You should see the following output:
Field: contact_name is visible
Field: contact_email is visible
Field: contact_number is visible
Field: contact_message is visible
Field: assets_field is visible
Go to the CP (make a user first, obviously)
Edit the Blueprint via the CP - and Save.
You will now see:
Field: contact_name is
Field: contact_email is
Field: contact_number is
Field: contact_message is
Field: assets_field is
The default value of visibility is not being included.
Logs
No response
Environment
EnvironmentApplication Name: StatamicLaravel Version: 11.7.0PHP Version: 8.3.7Composer Version: 2.7.6Environment: localDebug Mode: ENABLEDURL: formtest.testMaintenance Mode: OFFCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: statamicDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStatamicAddons: 0Sites: 1Stache Watcher: EnabledStatic Caching: DisabledVersion: 5.1.0 Solo
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered:
duncanmcclean
changed the title
[5.x] Form blueprint field config is missing default values
Form blueprint field config is missing default values
May 15, 2024
Bug description
Saving a 4.x Form blueprint in 5.x strips out configuration properties when their value is the default value - see #9685
For example setting the Visibility of a field to be
visible
results in thevisibility
property being removed from the Blueprint YAML. Setting it to Read Only correctly saves it asreadonly
.However when looking at the fields output within Antlers on the front end, these missing properties (i.e.
visibility: visible
) are no longer included.Another PR was made that adjusted this for field config (#9010) however does not seem to apply to frontend forms.
How to reproduce
You should see the following output:
You will now see:
The default value of
visibility
is not being included.Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: