Page 1 of 1

Modifying User Registration Form - Hiding the Timezone field

PostPosted: Tue May 05, 2009 1:21 pm
by yvan
I'd like to customize the User Registration form, and am uncertain as to how to go about it.

Ideally, .. I'd like to change the "Timezone" dropdown box to a hidden field that contains the value for the UTC timezone (ie: universal time).

If this isn't possible, however, then the next best thing would be for me to just remove this field altogether, and then update the timezone column in the users table of the mysql database with a default value.

What would be the best way to go about this, .. and how?

Thanks!
- Yvan

PostPosted: Wed May 06, 2009 9:52 am
by shannah
You can change the timezone widget to hidden by adding the following to the tables/users/fields.ini file :

Code: Select all
[timezone]
    widget:type=hidden


You can set a default value for this field by adding the following to the users table delegate class (tables/users/users.php)

Code: Select all
function timezone__default(){
    return 'UTC';
}


Or something along these lines.

The key is that all of this is set in the users table so you can customize it using the fields.ini file and delegate class for the users table.

PostPosted: Wed May 06, 2009 11:40 am
by yvan
Perfect -- thanks!

- yg