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).

CommentFileSizeAuthor
Schermata da 2017-11-28 21-56-04.png8.55 KBand9000
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

and9000 created an issue. See original summary.

dww’s picture

Status: Active » Closed (duplicate)
Parent issue: » #2838457: Re-enable the default value functionality for Address fields

Yeah, 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