How to adding Profile Questions over 31 values? | Forum

Topic location: Forum home » Support » General Questions
Phicheth Nov 20 '10
by the way 31 values for Profile Questions is not enough for Country list or language list..

Country list is over 230+ Country in planet... but can add only 31 country..

Language list more than 40+ language adding too..

How can change limit of Profile Questions values from 31 values to 300 or unlimited values?

anyone can help, please..
Bjorn Nov 20 '10
Look in the file:
/ow_system_plugins/admin/controllers/questions.php

Have no idea what to change :)
Phicheth Nov 21 '10
I got error message "parsererror" after change

if ( $key > 30 )
{
break;
}

to
if ( $key > 300 )
{
break;
}

and

for ( $key = 0; $key < 31; $key++ )

to
for ( $key = 0; $key < 300; $key++ )

i don't know how to change it and get work.. maybe some where to change in config
Toni Nov 22 '10
I need this aswell so i subscribe to this thread

Team
Emil Nov 22 '10
'Select' type question is not intended for location. We will introduce proper location-type question later. The limit of 31 values can't be worked-around because of the way data is stored.
Phicheth Nov 22 '10
also Height and weight need " select " over 31 values .. not only location-type needed.. maybe you can proper common type that able to adding unlimited values that will be best answer
John Nov 30 '11
Please let me know when there is a solution to this problem.
Etienne Feb 9 '12
Yeah! Location and language dropdown it's really important!!! When we can have it on oxwall? wich release please?
Team
Michael I. Jun 20 '12
Since there is no optimal solution now, this feature is still in planning stage.
Scott Larson Feb 4
It is hard to believe that 2 years later, with a fairly popular social networking platform that a simple state / country search option is still not available. I like everything else, but come on, it's like creating a successful tablet computer and leaving off arrow keys... Oh wait a second.... This is just sort of funny since it is typically the first and most basic profile search people use. Ay word of successful fixes or workaround a yet?
Team
Aliia Feb 7
Scott, no news yet.
Etienne Mar 1
Terrible, 2 years later yeah oO


Where is the problem with this option?

Team
Aliia Mar 4

>>Where is the problem with this option?


If the field of list or multi list type, it is saved as "enum" type of field in the database. Values of "enum" type of field, in turn are saved not as values, but as integers. For example:


USA= first power of 2=2

Canada=second power of 2=4

UK=third power of 2= 8

Greece= fourth power of 2=16

.....

http://en.wikipedia.org/wiki/Power_of_two


PHP has a PHP_INT_SIZE with maximum value of 2 747 483 648. Which is 31st power of 2. ( 2 ^31).

That is why currently you can't enter more then 31 values.


To fix this issue data should be saved in another type of field ( not "enum" within the database). This iscomplex change, since "enum" type of field has quite a lot of benefits which are already used in other features.


Having other important features to develop ( http://www.oxwall.org/roadmap) we just didn't have time to improve the feature with list/multilist type of fields.

The Forum post is edited by Aliia Mar 4
Gabriel Apr 5
I hired someone and they were able to make my site have 300 options. Only bad thing is that I can never update the mainframe. or I lose all code :(
DavidZenry Apr 6
I still can‘t understand why this has been made so complicated. Why not use simply use VARCHARS?

Whatever the benefits are, the resulting application is far too restrictive.
The Forum post is edited by DavidZenry Apr 6
Team
Aliia Apr 8
DavidZenry, we have this feature in our "to do list'.
Etienne May 12
Any news on that subject?
Team
Aliia May 12
Etienne, no news yet.