Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
JayKayAu CreditAttribution: JayKayAu commented+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?
Comment #2
gagarine CreditAttribution: gagarine commentedIf they are no value simply don't try to use them as a default value.
Comment #3
AlexisWilke CreditAttribution: AlexisWilke commentedDuplicate? #1022218: Required fields should not be enforced for default values
Comment #4
gagarine CreditAttribution: gagarine commentedI marked the other issue as duplicate. This one is still valid.
Comment #5
paulmckibbenSubscribe. Sorry for the duplicate!
Comment #6
GaryWong CreditAttribution: GaryWong commentedFYI, 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!