We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to adding Profile Questions over 31 values? | Forum

Topic location: Forum home » Support » General Questions
Oktay
Oktay Jul 14 '13

no News yet???

ross Team
ross Jul 15 '13
No news yet. Please, follow our blog, we will let all of you know asap
The Forum post is edited by ross Jul 15 '13
Etienne
Etienne Jul 19 '13
Will be integrate in the 1.6?
ross Team
ross Jul 21 '13
No news yet. Please, follow our blog, we will let all of you know asap
Evgeny
Evgeny Aug 23 '13
:( not good.

This is probably the only thing that will stop me from migrating from SE to OxWall. OxWall is way better in so many ways and I'll love to see this fixed ;).

I can try to patch this up but will be better to have it in the pipeline.

Is there a vote where I can give mine for this development suggestion?

ross Team
ross Aug 26 '13
Karthi
Karthi Jul 8 '14
Hi All,

    Is this >31 option available in 1.7, or alternate option to add list with more than 31 values, or option like in SE like country list...please let me know

ross Team
ross Jul 8 '14
No, it's not available in 1.7
Joe
Joe Oct 4 '14
Wow, still nothing?
Kяuncн Leader
Kяuncн Oct 5 '14
Use Google Maps Location plugin and then no worries of just 31 values/Countries
MacProcess
MacProcess Dec 1 '14
No update?? cannot believe that you cannot enter a list of countries in such software
Kяuncн Leader
Kяuncн Dec 1 '14
And if you was to use the Google Maps Location plugin there would be no worries of this issue.
ross Team
ross Dec 1 '14
Krunch +1
Peace Osinike
Peace Osinike Feb 8 '15
Well, I need it to enter the list of 400 tribes in my country and 37 states in my country. It's not just for location, and google map can't fix mine. So it will be really nice if this can be fixed asap.
The Forum post is edited by Peace Osinike Feb 8 '15
Taissa Team
Taissa Feb 16 '15
This was discussed a lot of time.
It's not a problem of our software it's particularity of 'enum' type we use for profile questions system. For now we don't have plans to change it because this type meets all our software requirements (http://www.oxwall.org/forum/topic/379?page=1#post-46609)

Guys, we believe you should reconsider your profile questions system concept or  if you need the field to contain more than 31 values, you need to develop your own field type: http://www.oxwall.org/forum/topic/12217?page=1#post-91296.

Krishnakumar
Krishnakumar Apr 6 '15
Anybody knows this option available in Skadate?
Taissa Team
Taissa Apr 6 '15
Krishnakumar, as far as I know, SkaDateX have the same 31 values limit.
You may check it using the demo: skadate.com/xdemo ( admin/demo).
Roger
Roger May 18 '15
Wow all these years and still no development of a state or country list. Maybe time to consider a new platform, if I had known this before hand I would have chosen differently.
Kяuncн Leader
Kяuncн May 19 '15

Quote from Roger And if you was to use the Google Maps Location plugin there would be no worries of this issue.

And if you was to use the Google Maps Location plugin there would be no worries of this issue.
Jeff
Jeff Jul 17 '15
Oxwall team explain that 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. By this way of course, the limit of 31 values can not be extended.

They also say that's not a major priority of development right now... And  it will require quite complicated code modifications....
 I think anyway that Oxwall developer must be completely disconnected with reality of fundamental aspect needed in a dating modern website.

And regarding the complicated aspect.... Piece of bad faith.... It take me a couple of hours to do It !!!

First you need to add a new class for that in file "form_element.php".

Exemple for size :

class HighField extends FormElement
{
    
    /**
     * Constructor.
     *
     * @param string $name
     */
    public function __construct( $name )
    {
        parent::__construct($name);

        $this->addAttribute('type', 'text');
    }

     
    public function renderInput( $params = null )
    {
        parent::renderInput($params);
    

        $highOptionsString = UTIL_HtmlTag::generateTag('option', array('value' => '< 140 cm'), true, '< 140 cm   ');
       
        for ( $i = 140; $i <= 200; $i++ )
        {
            
            $attrs['value'] = $i.' cm ';

            $highOptionsString .= UTIL_HtmlTag::generateTag('option', $attrs, true, $i.' cm   ');
        }
      
      $highOptionsString .= UTIL_HtmlTag::generateTag('option', array('value' => '< 140 cm'), true, '> 200 cm   ');

        $attributes = array();
        $attributes['name'] = $this->attributes['name'];
        $attributes['id'] = $this->attributes['id'];
        $attributes['type'] = 'hidden';

        $highAttributes = $this->attributes;
        $highAttributes['name'] = 'high_' . $this->getAttribute('name');

        if ( isset($highAttributes['id']) )
        {
            unset($highAttributes['id']);
        }

        
        {
            $result = '<div class="' . $this->getAttribute('name') . '">
                            ' . UTIL_HtmlTag::generateTag('input', $attributes) . '
                            <div class="ow_inline owm_inline">' . UTIL_HtmlTag::generateTag('select', $highAttributes, true, $highOptionsString) . '</div>
                        </div>';
        }

        return $result;
    }
}

As you can see, this class will generate an "select" 'option' form with as much  item as you want ! (I personaly use cm cause I am in Europe, but think a quite adaptation can be made for feet, and also depending of language.. anyway that's just an example who could be clearly be improved ! I did It in one shot) 

I also think that I will add soon some other data like question preference in profile user, for instance regarding miles or km, kg vs lb... etc etc... I am just very new for one week with this script...

You need also to manipulate the database and create 2 additional 'enum' in the presentation column on `ow_base_question table`, I personalty create high and weight to make it Match with the new classes.
This 2 additional "presentation'  must be properly declared in the file 'question-service.php' :

const QUESTION_PRESENTATION_HIGH = 'high';
const QUESTION_PRESENTATION_WEIGHT = 'Weight';

And of course declare properly the case example for high :

case self::QUESTION_PRESENTATION_HIGH :
                     $class = new HighField($fieldName);
                    break;

So I just have a little issue to validate It cause I need to push the answer of this question in the "ow_base_question_data' and as I am a newbee with oxwall code, but maybe this small effort could be made by the support ?? lol !!!

Team !!!! A piece of help to finalize that and eventually pushed It in the next version ?? This is a really a major issue for plenty of people ! And fundamentally, that's awfully easy to do It !!!

Xo
Pages: « 1 2 3 »