News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Profile fields select box limitation?

Started by CaptainKirk, January 31, 2009, 12:11:22 PM

Previous topic - Next topic

CaptainKirk

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.

CaptainKirk

#1
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?

CaptainKirk

Doesn't anyone have an answer to my question?  Not even support personnel?

karlbenson

the max length is 255 characters.  This is limited by the field type which is set to tinytext (which has max lenght of 255)

greyknight17

CaptainKirk, is this issue resolved now? It should fit if you used only the state abbreviations.

CaptainKirk

Sorry.  Verification that the field is limited resolves the issue.

ActivePatriot

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

Hoodie

Thanks for the help ActivePatriot..  That's exactly what I needed for my selection box..

Advertisement: