Problem/Motivation
Default country and unlimited values on address widget breaks validation/submit as other address fields gets validated even when they don't have to.
I've a content type with an address field "field_address" which is shown conditionally using form state if another checkbox is selected ("field_show_address"). If "field_show_address" is not selected "field_address"'s state is "visible = FALSE" and "disabled = TRUE" which works fine: if I submit the form "field_address" is not saved on db even if it's populated.
If I turn on "default_country" on address widget it breaks: address's fields get validated even if address's state is "disabled = TRUE" and I can't submit (see image attached).
Comment | File | Size | Author |
---|---|---|---|
Schermata da 2017-11-28 21-56-04.png | 8.55 KB | and9000 |
Comments
Comment #2
dwwYeah, the way address.module is trying to handle default values is broken. See #2838457: Re-enable the default value functionality for Address fields for the full story. Let's fix it over there.
Thanks,
-Derek