MyBB Community Forums
USERFIELD LENGTH - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: USERFIELD LENGTH (/thread-7819.html)



USERFIELD LENGTH - Kimmo - 2006-03-27

Hello there,

Is there a way I could limit the length of the userfield-box in the EDIT PROFILE-form? I would also like to force a linefeed if the name becomes too long.

If I set the MAX LENGTH as 50, it's going to break my 'frame' for the site...if I use 30, it is not enough for some values that need to be stored there...

So I would like to have the following:

1) EDIT PROFILE-form to limit the entry-box at 30char but it would accept up to 50char values

2) PROFILE-page would forcefeed a linechange after 30char or the nearest empty space before that.

Can I do this by editing templates (I think the first might be possible) or do I need to request a mod for it?

cheers,
Kimmo

PS. There would be a number of other userfields I would like to use this with as well (I have about 30 userfields set up)




RE: USERFIELD LENGTH - Michael S. - 2006-03-27

You can use the attribute maxlength in text fields. Example:
<input type="text" maxlength="5" />



RE: USERFIELD LENGTH - Kimmo - 2006-03-27

okay..that takes care of the input form.....how about the profile itself....want to force linefeeds after that maxlength so it doesn't break my frame-structure even if the value is longer...



RE: USERFIELD LENGTH - Kimmo - 2006-03-28

I thought I had it...but it looks like I need a little more handholding...can you tell me in which template do I need to make the change that will force both usertable-values as well as the customfield-values entry-boxes to be fixed width but still allow longer values.....so the box could be 30char but the value could be 50char