I've found the need lately for a way to represent complex fieldtypes like Matrix, Entries, etc as strings. e.g. in the following plugins:

Currently, it seems like you have to more or less account for every fieldtype and do some special processing.

I'm wondering if there is a method that every fieldtype can use (__toString or other) to do this kind of thing in a unified manner.

I was looking at how Craft does the Matrix "preview" for collapsed rows, but I think that's just all JS.

1 Answer 1


There isn’t, and yeah, the collapsed Matrix block preview text is just created with some Javascript that checks the fields and their inputs within each block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.