I have profiles (Users) that can have multiple addresses (currently two Smart Map fields called profileAddress1
and profileAddress2
).
I know how to filter by a single address:
{% set results = craft.users({
group: 'profiles',
profileAddress1: {
target: 'Cologne',
range: 20
}
}) %}
How would I search across both fields? So if a profile had two addresses – one in Cologne and one in Munich – it should show up in the results in both search cases (Cologne and Munich).
Is that even possible?
profileAddress2
field returns results whoseprofileAddress2
field is empty. It seems like it’s querying forprofileAddress1
instead. Other results that should show up (because they have a matching address set inprofileAddress2
won’t show up. Is that maybe a bug in the SQL query or something? It’s driving me crazy :)