Hi, I'd like to limit the number of characters that are displayed in a ComplexTableField (in CMS) while keeping the underlying data in tact for display in the popup. Any thoughts?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
One simple way to do is to create a function in your DataObject that returns the truncated text, then add the name of that function to the summary fields, like
static $summary_fields = array(
'Name',
'Title',
'TruncatedCondent'
);
function TruncatedContent() {
// return $this->Content, truncated in some way
}