1
deka87
profile/search.php dropdowns
  • 2008/12/25 20:18

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hi,

i want to add a dropdown in the registration form so I choose teh "select" field type. but when i go to profile/search.php it doesn't show the dropdown for the created field but multiselect. how do i fix it?
Mind anchors

2
Monika
Re: profile/search.php dropdowns
  • 2008/12/26 0:54

  • Monika

  • Not too shy to talk

  • Posts: 103

  • Since: 2008/12/19


me too, i want the same thing :)

3
deka87
Re: profile/search.php dropdowns
  • 2008/12/27 6:30

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hello, any suggestins?
Mind anchors

4
deka87
Re: profile/search.php dropdowns
  • 2009/1/1 21:24

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hello???
Mind anchors

5
trabis
Re: profile/search.php dropdowns
  • 2009/1/1 21:40

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


What is the problem? It shows a multi selection box instead of single selection box? Is not that the idea of searching?

If you want to make it single selection then go to search.php and change line 87:
case "select":
                
$options $fields[$i]->getVar('field_options');
                
$size MINcount($options), 10 );//change 10 to the max-size you want for the box;
                
$element = new XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null$sizefalse);//changed true to false
                
asort($options);
                
$element->addOptionArray($options);
                
$searchform->addElement($element);
                unset(
$element);
                break;


But this will have effect in all select boxes you have.

6
deka87
Re: profile/search.php dropdowns
  • 2009/1/2 8:32

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


thanks I'll give it a shot. if you have 250+ items in the dropdown box then multiselect is not a good idea cos it looks kinda ugly.
Mind anchors

7
deka87
Re: profile/search.php dropdowns
  • 2009/1/2 9:40

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


I've tried this but this is not exactly what I wanted to do with it. I want it to look like dropdown in the search.php. What you suggested just makes it show only as many lines as I want but not a dropdown with a single option it is possible for you to choose.
Mind anchors

8
ghia
Re: profile/search.php dropdowns
  • 2009/1/2 11:09

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It is unclear what your obtained result is (with the two proposed modifications) and what the exact difference is with the desired result.

9
deka87
Re: profile/search.php dropdowns
  • 2009/1/2 11:40

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


I've changed the 87th line to "1" and got this:http://7.pdvop2sz.z8.ru/modules/profile/search.php (see source language line). I want it to look like "Sort By" line or like in this example:http://www.translatorscafe.com/TCUtils/search/
Mind anchors

10
ghia
Re: profile/search.php dropdowns
  • 2009/1/2 12:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It seems you did not yet implement the language profile field to a select.

Login

Who's Online

234 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits