1
Cuidiu
Default selection for field in register.php
  • 2006/6/17 20:49

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hello All,

I must be doing something wrong. I'm trying to add a few countries to a dropdown selection list in the Extended Profiles module. I add the field and select the default but the default is not sticking. The field type is "select" value type is "array". The default seems to work on other field types. I've tried this in two different MySQL versions on two XOOPS sites and the same thing happens. The default is showing in the database but it is not displayed as the default in the dropdown. We are US based so we'd like US to be the default but Canada is the one it defaults to. Is there a way to fix this?

On another note, is there another way to go about adding a dropdown list of countries and/or states to the extended profiles module? Perhaps someone has already made a hack and I haven't come across it yet?

Thanks in advance!
Cuidiu
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

2
m0nty
Re: Default selection for field in register.php
  • 2006/6/17 20:55

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


use XOOPS existing form class

XoopsFormSelectCountry

3
Cuidiu
Re: Default selection for field in register.php
  • 2006/6/17 21:05

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hi m0nty,

I'm assuming this has to do with adding countries. This would be good to know for future use but I actually only need to add a few countries now so this might be a bit overboard if it is something that adds all countries...?

I'm really just needing to make the item selected as the default actually show up as the default. Is this not possible?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

4
m0nty
Re: Default selection for field in register.php
  • 2006/6/17 21:26

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i dunno.. i'm sure it's possible tho, just that i don't know how as i'm not familiar with XOOPS 2.2 profile module and how it creates it's fields.. i stopped using XOOPS 2.2 a long while ago.

5
Cuidiu
Re: Default selection for field in register.php
  • 2006/6/19 15:51

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Any advice on how I can make the selected default display properly in the registration page?

Quote:
I add the field and select the default but the default is not sticking. The field type is "select" value type is "array".
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

6
Cuidiu
Re: Default selection for field in register.php
  • 2006/6/20 23:43

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I guess I just didn't understand how this worked. I found out that if I use field type "select" and value type "text field" the default will set properly.

So much to learn... so few cells left to retain.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

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


Members: 0


Guests: 161


more...

Donat-O-Meter

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

Latest GitHub Commits