Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: CaptainKirk on January 31, 2009, 12:11:22 PM

Title: Profile fields select box limitation?
Post by: CaptainKirk on January 31, 2009, 12:11:22 PM
I'm attempting to put together a selection box in the registration profile fields allowing the user to select his/her state when registering.  However, I can only get to New Hampshire and even though I can enter the rest of the states in admin mode, when I check the registration form, the list only goes to New Hampshire.  When I build a test list using only numbers (01-50) I see all 50 selections.  Is there some kind of character limitation in the selection box code or is this a glitch or am I simply missing something obvious?

Thanks in advance.
Title: Re: Profile fields select box limitation?
Post by: CaptainKirk on January 31, 2009, 12:44:42 PM
I believe that there is a character limitation, somewhere around 230.  After entering that number of characters, no matter how many fields are available, the display buffer fills up and won't display anymore.  There is probably someplace in the code that this is apparent, but I'm way too lazy to go searching.

So is this a problem or something that I have to workaround?
Title: Re: Profile fields select box limitation?
Post by: CaptainKirk on February 02, 2009, 08:08:25 PM
Doesn't anyone have an answer to my question?  Not even support personnel?
Title: Re: Profile fields select box limitation?
Post by: karlbenson on February 08, 2009, 02:01:31 PM
the max length is 255 characters.  This is limited by the field type which is set to tinytext (which has max lenght of 255)
Title: Re: Profile fields select box limitation?
Post by: greyknight17 on February 16, 2009, 05:58:25 PM
CaptainKirk, is this issue resolved now? It should fit if you used only the state abbreviations.
Title: Re: Profile fields select box limitation?
Post by: CaptainKirk on February 26, 2009, 12:39:38 PM
Sorry.  Verification that the field is limited resolves the issue.
Title: Re: Profile fields select box limitation?
Post by: ActivePatriot on July 26, 2009, 02:59:18 PM
I had the same issue.
For Clarification to anyone else with this problem:
It is your MySql Database that is giving the error.
To correct go into your MySQL database and find the custom_fields table.
open it for edit and find the field_options column.
change the data type from TINYTEXT to TEXT.

Now you can enter all 50 states (full names) and countries or whatever else without the character limits

This really should be changed in the next SMF update.
Everyone trying to set up Country, State, City Fields will run into this problem
Title: Re: Profile fields select box limitation?
Post by: Hoodie on August 09, 2009, 10:56:38 PM
Thanks for the help ActivePatriot..  That's exactly what I needed for my selection box..