truncate text with an ellipsis

How to truncate text with an ellipsis in a CF form listing.

Overview

The issue occurs when displaying long text fields from a database table, as they appear in full and clutter the listing view.
Use the PHP functions box in the form settings to apply a substring function to the field, limiting the displayed characters. For more advanced features, consider upgrading to CF v6.

Answered
rl rluongo 27 Jan, 2017
Hello everyone and congratulations for the forum,
I created a form with access to a table to display the stored data.
I would make sure that the text contained in the fields may not appear in full but only in part, and then do it fully display in the edit form. how can I do?
eg: Lorem Ipsum is simply dummy text of the printing and typesetting industry.
I would like this: Lorem Ipsum is simply dummy text ...
thank you very much for the attention
Max_admin Max_admin 27 Jan, 2017
Answer
Hi rluongo,

You can do this by adding the field name to the "PHP functions" box:
Model.field:return substr($cell, 0, 10);


I suggest that you also try v6 instead, because it has many more features, here is a tutorial for a basic listing:
http://www.chronoengine.com/faqs/73-chronoconnectivity-v6/5283-build-a-basic-listing.html

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.