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
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 |
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 |
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. |
Hello,
Have nobody any idea?
BR Salvatore |
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. |
OK,
So we have to wait for him.
BR |
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) |
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.
|
I have now tried a lot and I hope I have a solution:
Thank you! 7.3.5 with responsive UNI |
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. |
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' ) |