I'm new to Drupal, so this question may really be a general Drupal question. I love the address module, in particular the country/state dependent dropdowns using ajax and database tables (I've sampled other Drupal ajax-enabled dependent dropdown solutions, but this one seems the cleanest).
But for my purpose I don't need the other address fields, so I was wondering -- what is the recommended way to hide them? I'm using nodeprofile to create a "User Profile" content type, and I want an edit form and a view form that has just Country, State, and City (among other things).
I know I could modify the cck_address.module file and remove references to these fields, but that seems pretty hack-ish, so is that the best way to do it? Or should I:
1. Create my own module (using cck_address as a basis), with only the fields I need?
2. Use the Views module (or Forms module?) to create my edit and view forms?
3. Use straight php and the Forms API?
4. Something else?
Thanks in advance for your patience with what might be a naive question.
Andy
Comments
Comment #1
rconstantine commentedsee http://drupal.org/node/161782
also, I would advise against creating a version of this module. if you can instead contribute a patch to this effort, that is the preferred Drupal way. you'll find another address cck module out there that came after this one that has since been abandoned. they simply didn't notice this existed.
anyway, as a hack for now, you can hide the interface for both the input and display of the fields you don't want. DO NOT hack the storage/cck-specific stuff as you will break things. you will probably be looking to hack the widget function and the theme function(s).
Comment #2
afinke commentedThanks, that's just what I needed to know. And I'm looking forward to the other enhancements you mention in that post.