Community > Exchange
216 views

Registration Form - Timezone Dropdown

My client wanted ALL user interaction with their profile info to be via a Live Forms app and not use the DNN tools. Since the website is for an international organization, TIMEZONE was an important data point to set. 

I hoped to populate the "Timezone" field in my LiveForms' form using an SQL action to pull in the data from the DNN database. Years ago DNN apparently handled Time Zone differently, so I was immediately thwarted in creating that element because I was (and still am) unable to discover how DNN populates its field in the profile dropdown. Yes, there is a TimeZones.XML file in the DNN v.9x "App_GlobalResources" folder. However, this seems to be a legacy, because the current dropdown has many more entries (and the XML content doesn't work, so...)

I searched around - found several sources that used a variety of versions for both the TEXT and VALUES -- none of which populated the DNN Profile field correctly. Ultimately, I manually changed a user profile to one Timezone in his DNN profile, saved, and did an SQL query on that record to capture the timezone value that DNN stored in the database. That let me to a better Google search where I found a table that came pretty close to the DNN list of Text and Values. DNN had a dozen more entries, and I am assuming it is more 'up to date'.

FINALLY I complied the full list of "Options" I can use in my LiveForms field. I added the contents of the attached TXT file the LISTS so I can use it in all the create / update profile forms I need to build on this site! 

Here's how:

  1. Open your form's page in Edit mode. Click Manage --> Form --> Options
  2. Click the LISTS button to open the list of lists.
  3. Click the "Create" button. This action will only create...
    SCOPE = how widely do you wish this List to be used across your system (I chose "Host" to make it always available)
    NAME = give the list a simple name "Timezones"
    Click "Add" button to save.
  4. Now, find that Timezones list and click its green edit button.
  5. Paste the list of timezones (from the attached list) into the textbox. Be sure there are no extra spaces or empty rows.
    Click "Update" to save the list.
  6. Return to your form editing. If you haven't already, create a DROPDOWN widget and name it "Timezone"
  7. In the options bar for this field, DO NOT use "Options" but rather click on "Lists"
  8. Select Timezones from the list. (The "List" automatically populates the "Options" - so just leave it!)
  9. You're done!
THIS LIST IS AS OF DECEMBER 22, 2020.  I anticipate that DNN is pulling its list of timezones from some standardized place, and thus new entries DNN adds will not be reflected in this list. I would really appreciate it IF ANYONE knows or discovers how DNN works with the TimeZone, to post a comment here. If/When I find this out, I will add a way to populate the options via an SQL Action so the form stays up-to-date with DNN data. 
 
But for now, this should work!
 
Attached Files
David Loofbourrow David Loofbourrow
asked 12/22/2020 19:18
  • LiveForms
  • Timezone
  • Time Zone
  • Live Forms

endorsed by
  • Mandeep Singh
  • Mariette Knap
Add Comment
Orrouk
replied 06/06/2021 19:47

I'll have a look at your file and also... I'll keep an eye open and let you know if I discover the source of the dnn timezone list.

Have a good day.

Mandeep Singh
replied 12/22/2020 22:14

David,
Thanks for sharing this with the community. 

Last Activity 06/06/2021 19:47