Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
mcsg Posted February 4, 2021 Posted February 4, 2021 The custom field address type embeds different attributes (or data element) parts into one field. Is there a way to access the different parts directly? Like the zip/postal code? <!-- how to filter out just the zip code? --> {$record->customFieldDisplayByKey('address','raw')|raw}
bfarber Posted February 5, 2021 Posted February 5, 2021 This one is going to be a bit trickier realistically. I think a better option might be to use the field formatting option if this is for listing or content view. Then you can do something like this in the "custom template" option. {{$json = \IPS\GeoLocation::buildFromJson( $formValue );}} {{ /* All the address properties will be in the $json object now... */ }}
Recommended Posts