Skip to Content Skip to Menu

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

[SOLVED] Displaying a Text Area field in User lists

  • big_rich
  • big_rich
  • OFFLINE
  • Posts: 11
  • Thanks: 0
  • Karma: 0
13 years 10 months ago #148861 by big_rich
Hi,

I want to display a "Text Area" field as the 3rd column of my userlists. I don't want to limit the area of the field when it appears on the users profile because I want them to be able to write as much as they like in this field.

This gives me the problem that if a user writes a lot they could end up having a very large entry in the userlist !

Idealy I'd like to limit the number of characters which appear in the userlist, so that a truncated version of the users entry is shown.

If this isn't possible, how can I limit the line height ?

I assumed I could just set this with css but when I tried using :

#cbUserTable .sectiontableentry1 { height: 8em;}

in my template.css but this just acts as a minimum height (expanding all lines up to this but not limiting the max )

max-height seems to have no effect

Thanks for your help

Post edited by: big_rich, at: 2010/12/16 18:50

Post edited by: big_rich, at: 2010/12/17 14:26

Post edited by: krileon, at: 2010/12/17 18:39

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
13 years 10 months ago #148898 by krileon
You'll need to also hide the overflow. Setting just height won't do anything as the content will push it. max-height does work, but again you've not handled the overflow. Please try something like the following.

[code:1]
#cbUserTable .sectiontableentry1 {
height: 8em;
overflow: hidden;
}
[/code:1]

I recommend targeting the field specially though (examine with FF for the class/ID) instead of affecting the entire row. As the above only affects row 1,3,5, etc.. Example as follows.

[code:1]
.cbUserListFC_cb_area {
height: 8em;
overflow: hidden;
}
[/code:1]

The above would affect just cb_area 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.

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

  • big_rich
  • big_rich
  • OFFLINE
  • Posts: 11
  • Thanks: 0
  • Karma: 0
13 years 10 months ago #148908 by big_rich
Thanks Kyle - that sorted it.

For some reason I couldn't get it to work on the individual field class though. So in the end I did the following:

[code:1] .cbUserListCol3 .cbUserListFieldLine {
max-height: 8em;
overflow: hidden;
}[/code:1]

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

Moderators: beatnantkrileon
Powered by Kunena Forum