Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Limit field display length on list views

  • savvygents
  • savvygents
  • OFFLINE
  • Posts: 5
  • Thanks: 0
  • Karma: 0
  • Add-ons
11 years 7 months ago #223597 by savvygents
Limit field display length on list views was created by savvygents
Is there any way to limit the character length that's displayed in a list view?

We have one using all 4 columns and one of them is a testimonial field. If the testimonial is long it throws everything else off.


Using a standard textarea field.

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago - 11 years 7 months ago #223610 by krileon
Replied by krileon on topic Limit field display length on list views
You could use a CB Query Field to query the database for the value and that'd let you use SQL functions to shorten it. You could also use CSS to limit the height of the row and set overflow to hide. You could also try using text-overflow (CSS3), but it'll only work on modern browsers, which should be ok. You can see an example of text-overflow below.

jsfiddle.net/fVeqY/

More information on text-overflow can be found below as well.

www.w3schools.com/cssref/css3_pr_text-overflow.asp

I suggest the CSS approach as it's better then querying to database multiple times for the field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 7 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • savvygents
  • savvygents
  • OFFLINE
  • Posts: 5
  • Thanks: 0
  • Karma: 0
  • Add-ons
11 years 7 months ago #223709 by savvygents
Replied by savvygents on topic Limit field display length on list views
Thanks for the reply.
Going with a CSS based approach in this case. Quickest and easiest :)

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum