I think, spaces are also saved on postal code input on node save, that's why when used in views filter, typing 85704 won't show any result.
use trim() on node save.
I think, spaces are also saved on postal code input on node save, that's why when used in views filter, typing 85704 won't show any result.
use trim() on node save.
Comments
Comment #1
rszrama commentedThis module doesn't do any processing of input - it just takes what the user enters and saves it. This is pretty standard behavior, so I don't see a bug in what it's doing. However, adding such a trim is a decent feature request, so I'm recategorizing this. In the meantime, you can update your Views filter to use the "Contains" operator instead of the "Is equal to" operator.
Comment #2
rszrama commentedA recent commit just implemented hook_field_presave(), so I've added this trimming to it.
Commit: http://drupalcode.org/project/addressfield.git/commitdiff/8c0e233