Option for Field type address to have Zip before City #1678
-
|
For addresses in Europe, the zip code is placed before the city. I was able to change it with the event Event::on(Address::class, Address::EVENT_MODIFY_FRONT_END_SUBFIELDS, function(ModifyFrontEndSubfieldsEvent $event) {
//move the field zip before the city
foreach ($event->rows as $key => $rowConfig) {
foreach ($rowConfig as $config) {
$handle = $config['handle'];
if ($handle == 'zip') {
$event->rows [$key] = array_reverse($rowConfig);
break 2;
}
}
}
});best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Totally understand that's the norm for Europe, but I'm pretty sure that's not for Australia, the US and a few other places and makes much more logical sense to put next to country and state (after city). But in that instance, it'll be addressed in #490 so that you'll be able to re-order these fields as required. |
Beta Was this translation helpful? Give feedback.
Totally understand that's the norm for Europe, but I'm pretty sure that's not for Australia, the US and a few other places and makes much more logical sense to put next to country and state (after city). But in that instance, it'll be addressed in #490 so that you'll be able to re-order these fields as required.