select dropdown Please select

hello,

 

I creat a lotof new profile fields and would like to have at first at all Drop Downs: "Please select ..."

 

How I can make this.

 

BR Salvatore

Quote · 18 Feb 2019

This should be automatic but it's not. Modzzz uses predefined values, but when I try it, I can't get it to work. 

I'm also listening, but you can read how to do it for the add albums part of the photos module here.

https://www.boonex.com/forums/topic/How-do-I-add-Please-Select-To-Add-Photos-form-.htm

Quote · 18 Feb 2019

For add albums and photo moduls I have see your post, but I need this for profile field (selct drop downws.).

The Country Gender and looking for have this value but not my onw created fileds. Here I need this.

The problem is when I make it mandentory, so I get no error that the field is not filled out.

Quote · 18 Feb 2019

Hello,

 

Have nobody any idea?

 

BR Salvatore

Quote · 19 Feb 2019

Most of these questions are answered by Leonid. He is either an employee of Boonex or he helps as a volunteer. Either way, he's a very busy man and it sometimes takes him several days to reply.

Quote · 19 Feb 2019

OK,

 

So we have to wait for him.

 

BR

Quote · 19 Feb 2019

Hello BR!

 

The selection of 0 and empty variant can be set for Predefined values. According to the chosen variant it may require to correct the block info codes like the method getBlockCode_Description from the templates/tmpl_***/scripts/BxTmplProfileView.php (parent was described in templates/base/scripts/BxBaseProfileView.php)

Quote · 21 Feb 2019

I have now tried a lot and I hope I have a solution:

 

In Predefined Values i create a list an on top I create a new entrie with 0 and lang key: _Please_Select_. Then

I create a new profil field choose in Generel Selector. In Advance I choose Select dropdown Box Create the Link like: #!haircolor and set the default value 0 mark it as mandantory , save all.

 

And now I get the field When I choose no value Please Select.

 

 

1.PNG · 6.3K · 205 views
2.PNG · 8.6K · 207 views
3.PNG · 12.5K · 188 views
Quote · 21 Feb 2019

 

I have now tried a lot and I hope I have a solution:

 Thank you!

7.3.5 with responsive UNI
Quote · 21 Feb 2019

Now that I know I was on the right track with predefined values, I'll have a try myself using Leonid's solution and prepare a tutorial.

Quote · 22 Feb 2019

I'm posting this in case someone wants to use list/array instead of pre-defined list:

1.  Create an array and put in the first empty value

              $aValues = array();

              $aValues[] = array('key' => '0', 'value' => '----');

 

2. Get your list of values and add to array

        $aGroups = $this->_oDb->getGroupsByUser(array('type' => 'extendable', 'owner_id' => $iOwnerId, 'full' => false));

           foreach($aGroups as $aGroup)  {

                $aValues[] = array('key' => $aGroup['id'], 'value' => ($aGroup['title']));

           }

3. Use your array in your form

            'type' => 'select',

           'name' => $sName,

               'caption' => $sTitle,

               'values' => $aValues,

               'checker' => array(

                'func' => 'avail',

                'error' => _t('_msg_incorrect_select')

            ),

            'db' => array(

                'pass' => 'Int'

            )

Quote · 2 Jan 2020
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.