Friday, November 2, 2007

States

Maybe I need to get rid of my obsession with doing things the Right Way. Or maybe I need to never, ever lose it. It's hard to decide.

So, the user_info part of the user preferences page is mostly done. Or I thought it was. Then I looked down at that troublesome "state" box in the address section. And I thought, "I should make another script to return state info in JSON and make this box read it, like security questions." Then I looked at the state table, and found that it has a country foreign key, which isn't specified in database.xml and doesn't have an xmldoom object associated with it. *cry*

So, I've got to make one of those, and then think of a good scheme for getting that data. What I'm thinking is having a parameter to state_list.pcgi of country, that defaults to USA. Because generally speaking, nobody cares about the stuff from Country, but compatibility dictates. I'll need a country_list.pcgi too, because I'll need a dropdown for country that determines what states you can select.

The whole reason we care about validating the state is that they aren't all in the database. Rumble.

Anyways, I can only work on this for so long today (let's say until lunch), and then it's all learning exports.

No comments: