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
When calling the Element's getSerializedFieldValues() method on an element that has a Colour Swatches field in the field layout, the return is not serialized — it's the model.
In the following example, I have an element with a field handle colorTheme.
When I call:
$element->getSerializedFieldValues();
I get:
[
// other fields, which are all serialized as expected...'colorTheme' => percipiolondon\colourswatches\models\ColourSwatches {...}
]
When calling the Element's
getSerializedFieldValues()
method on an element that has a Colour Swatches field in the field layout, the return is not serialized — it's the model.In the following example, I have an element with a field handle
colorTheme
.When I call:
I get:
That method calls each field's
serializeValues()
method here in Craft source.I do see in this plugin's source that the Colour Swatches field has its own
serializeValues()
implementation, so I'm not quite sure what is happening.Craft v4.11.5
Colour Swatches v4.5.2
The text was updated successfully, but these errors were encountered: