Forum Discussion

stgray's avatar
stgray
Guide
3 years ago

Limit character count for user's profile biography field

Hi folks,

 

I am looking to limit the characters that a user can input to the biography section (my settings -> personal -> personal information) in their profile.

Is there a setting for this in the admin console (or elsewhere)?

If not, I think the next best way would be to add some JavaScript to the page to add the limit to the text input and change the validation message, doing that feels like it might be a bit dirty, especially where backend validation is involved?

 

What is the best way of doing this?

 

thanks!

  • Pretty sure if you open a support case, they can change the min/max length/size of any attribute. We've had to do things like that w/ usernames where our system required more than the normal limit.

3 Replies

  • I'll let Khoros answer whether there is a setting on their side, it's not covered in community admin.

    If it's to do with displaying the bio you can truncate it in Freemarker for components for example:

     

    <#elseif motm.biography?length gt 750>
    <p>${utils.html.truncate(750, motm.biography, "...")}</p>

     

     

  • stgray's avatar
    stgray
    Guide
    3 years ago

    Thanks Malcolm, 


    I did wonder if users might wonder where the rest of their bio has gone if we truncate it and don't give them a mechanism to view the full thing.
    It could be that we're overthinking things, realistically I doubt any of our members will be using the full 10,000 characters available to them...

  • Pretty sure if you open a support case, they can change the min/max length/size of any attribute. We've had to do things like that w/ usernames where our system required more than the normal limit.