Hi while I was trying to configure the address field of a content type, I found that errors related to "default values" will prompt if I occasionally clicked the "Default Values" fieldset but did not fill anything in the required fields. It would be better if we have an option to set "Default Value" on / off like other modules do. Currently this module is usable, because if you don't want default values, DON'T expand that fieldset at all. Once you occasionally clicked on that fieldset, you will not be able to save the configuration without giving them default values. Thank you.

Comments

JayKayAu’s picture

+1 Subscribing as I have exactly the same problem.

Edit: The chaps handling the D7 "Address Field" module [appear to have the same problem](http://drupal.org/node/892938).. I'm going out on a limb by assuming that this D6 module, and the Address Field module came from the same code. If that is true, then perhaps the solution they've posted might be adapted here?

gagarine’s picture

Title: Needs a default value ON / OFF option on CCK Address Field configuration page » Default value can be empty for CCK Address Field

If they are no value simply don't try to use them as a default value.

AlexisWilke’s picture

gagarine’s picture

I marked the other issue as duplicate. This one is still valid.

paulmckibben’s picture

Subscribe. Sorry for the duplicate!

GaryWong’s picture

FYI, the workaround that worked for me was:
- create the CCK field with the "Address" type
- leave the fields to Visibility='None' while setting up labels, help text, etc.
- for the fields you need to have a default, set them to Visibility='Normal'
- expand the 'Default Values' group, setting the default (IMPORTANT: See below for a special case)
- collapse the 'Default values' group, and save
- Flush the cache (you may not need this, but I wanted to be sure that the 'Default Values' wasn't set to auto-expand.. in fact, I even logged off and on).
- Come back to the CCK content type definition, and set the Visibillity to 'required'/'normal'/etc for the fields you want
- hit 'save' and run-like-hell-outta-that-page =8^)

NOTE: http://drupal.org/node/1159966 points out some other configuration issues. The big one for me was using one of the 'top countries' as the default for my country field. "Tonga" was always chosen, even though it wasn't even one of my 'available countries'. Even choosing the default from below the 'Top Counties' list didn't work for me. I had to un-select all my Top Countries, and then select the 'normal' country value as my default (so 'no', I'm not using the Top Countries feature).

Thanks for this module though.. it's saved me a whack load of work!