On my "Front Page" I would like to add a character limit of 50 to (Notes.message:Notations) in CCv5. Once they click on a link it will take the user to the full text. Can anyone plz help.
Alex
Alex
Hi alex,
I think that you can use the MySQL SUBSTR() method in a custom column. Otherwise you could always crop the string with PHP in a PHP column.
Bob
I think that you can use the MySQL SUBSTR() method in a custom column. Otherwise you could always crop the string with PHP in a PHP column.
Bob
Bob,
I am not too familiar with how that goes, would you help me with the PHP code?
Thanks
I am not too familiar with how that goes, would you help me with the PHP code?
Thanks
Hi Alex,
The PHP would be something like
Bob
The PHP would be something like
<?php $row->xxx = substr($row->xxx, 0, 50); ?>
or maybe that needs to be $row['xxx'] in this version ???
Bob
I tried under PHP field
and
then I tried under Field
also with $row->xxx
and nothing. Am I missing here something?
Notes.message:<?php $row['message'] = substr($row['message'], 0, 50); ?>
and
<?php $row['message'] = substr($row['message'], 0, 50); ?>
then I tried under Field
Notes.message:<?php $row['message'] = substr($row['message'], 0, 50); ?>
also with $row->xxx
and nothing. Am I missing here something?
Hi Alex,
What's the actual name of the data entry you want to trim - your first post said Notes.message:Notations ?
Bob
What's the actual name of the data entry you want to trim - your first post said Notes.message:Notations ?
Bob
Hi alex305v,
I doubt that is the name as the : would cause problems. Whatever it is the PHP needs to use the same name in place of message
Bob
I doubt that is the name as the : would cause problems. Whatever it is the PHP needs to use the same name in place of message
Bob
Hello i have the same issue, the field that i want to display with character limit its named:
Consulta_Incidencias_Plexus_Azucena.Descripcion_error:Descripcion error
Where do I have tu put the code ?
I try in the option:Front List-Settings-PHP Funcions but it doesnt work
Could you help me ??
Thanks
Consulta_Incidencias_Plexus_Azucena.Descripcion_error:Descripcion error
Where do I have tu put the code ?
I try in the option:Front List-Settings-PHP Funcions but it doesnt work
Could you help me ??
Thanks
I try with the following codes, but wich one its the winner and how can I adapt to the field: Consulta_Incidencias_Plexus_Azucena.Descripcion_error:Descripcion error ???
I tried under PHP field
Notes.message:<?php $row['message'] = substr($row['message'], 0, 50); ?>
and
<?php $row['message'] = substr($row['message'], 0, 50); ?>
then I tried under Field
Notes.message:<?php $row['message'] = substr($row['message'], 0, 50); ?>
Hi angelmorales,
Please try this in the PHP Functions box
Bob
Please try this in the PHP Functions box
fieldNotes.message:return substr($cell, 0, 50);
Bob
Thanks , it works!!!!
This topic is locked and no more replies can be posted.