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: 65Questions: 14Answers: 0

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: 9,791Questions: 0Answers: 1,620
    Answer ✓

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

    Colin

  • rmeetinrmeetin Posts: 65Questions: 14Answers: 0

    My contractor showed me how to do this using Ellipsis.

Sign In or Register to comment.