Is there a render function to limit characters displayed in a field in table view?

Is there a render function to limit characters displayed in a field in table view?

rmeetinrmeetin Posts: 100Questions: 24Answers: 1

I have a table with half a dozen fields to display in table view. One of these is a comments field which could be a few words to a Michener novel. In PHP I can do something like:

$text = substr ($text,0,80);
if ( strlen ($text > 80 ) ) { $text = "$text ..."; }

An example please how to do this in datatables?

Bt the way, just wondering which formatting editor you are using here in the forum.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    You can use the Ellipsis plugin, there's an example of it here.

    Colin

  • rmeetinrmeetin Posts: 100Questions: 24Answers: 1

    My contractor showed me how to do this using Ellipsis.

This discussion has been closed.