Hi all,

I've just tried this module and, ok, empty (= only country has a value) address are not saved, but still new "empty" address are always added in node edit.

I'm using a multivalue address field (a node can have multiple address): could be this the reason? Does this module take in consideration a multivalue addressfield?

Thank you very much

Comments

deanflory’s picture

klonos posted a link to a related issue for D8 where they're trying to work out the "none" option for fields:

https://drupal.org/node/1379070

I'm not confident this will get into D7 this year+ since it's been an issue for years now.

robert castelo’s picture

Hi MXT,
I've developed this module for multiple addresses, so should work.

What do you mean 'new "empty" address are always added in node edit' - do you mean saved in the database or just showing as options in the form?

deanflory’s picture

I think what he means is that each time a new address is entered or if country is required, that when you go back to editing the node, more and more sets of addressfield fields are displayed more than the initial 2 (for multivalue). Since there is no way to remove addressfield entries they can keep adding up yet are blank.

mxt’s picture

Sorry guys, finally I went to another solution:

#968112: Allow addressfield to be optional

The above solution definitively works very well with no issues at all.

Returning to this module, I think the errors were triggered because my nodes also have a corresponding translation with entity_translation (with addressfield field not translated): for some reasons, when I saved a node, it duplicates "country" entries also for every translation... Anyway I can't remember exactly the errors because I immediately uninstalled this in favour of the solution reachable following the above link.

Thank you in any case for your work!

robert castelo’s picture

Status: Active » Closed (works as designed)