Modifying User Registration Form - Hiding the Timezone field

A place to discuss and receive support for the Web Auction application.

Modifying User Registration Form - Hiding the Timezone field

Postby yvan » Tue May 05, 2009 1:21 pm

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
yvan
 
Posts: 13
Joined: Tue Mar 24, 2009 12:48 pm

Postby shannah » Wed May 06, 2009 9:52 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby yvan » Wed May 06, 2009 11:40 am

Perfect -- thanks!

- yg
yvan
 
Posts: 13
Joined: Tue Mar 24, 2009 12:48 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved