---
title: "How can I pull the address from a field type that is not Address?"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview-pro/maps-premium-view/how-can-i-pull-the-address-from-a-field-type-that-is-not-address/"
---

The Maps Premium View requires to setup an address field as the source to geocode the map markers. That Address field is by default a standard Gravity Forms address field type.

You may select which address field you want to use under the View settings metabox > Maps, address field setting:

![Settings panel shows options to select an address field, map type, pin icon, and map position](https://www.gravitykit.com/wp-content/uploads/2025/10/file-D19NZdpZQk.png)
*What happens when you have stored the entry address in a different field type (e.g. Single Line Text) ?*

### Override the Address Field setting

In order to override the Address Field setting, you may use the filter hook ***gravityview/maps/markers/address/field\_id*** as in the following example:

```

/**
 * Custom Maps address field ID
 * @param mixed $field_id Gravity Forms field ID
 * @param GravityView_View object $view Current View object
 */
function my_gv_maps_address_field( $field_id, $view ) {
    if ( 'MY_VIEW_ID' != $view->view_id ) {
        return $field_id;
    }
    return 'MY_NEW_FIELD_ID';
}
add_filter( 'gravityview/maps/markers/address/field_id', 'my_gv_maps_address_field', 10, 2 );

// Note: Replace the MY_VIEW_ID by the View ID where you'll want to apply this code and the MY_NEW_FIELD_ID by the form field ID containing the address string.
```

```

/**
 * Custom Maps address field ID
 * @param mixed $field_id Gravity Forms field ID
 * @param GravityView_View object $view Current View object
 */
function my_gv_maps_address_field( $field_id, $view ) {
    if ( 'MY_VIEW_ID' != $view->view_id ) {
        return $field_id;
    }
    return 'MY_NEW_FIELD_ID';
}
add_filter( 'gravityview/maps/markers/address/field_id', 'my_gv_maps_address_field', 10, 2 );

// Note: Replace the MY_VIEW_ID by the View ID where you'll want to apply this code and the MY_NEW_FIELD_ID by the form field ID containing the address string.
```

Read here how to add these code samples to your website: [Where to put code samples.](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/)