Site docs are currently being updated 🚧 Thank you for your patience! 🙏

Range

ACF
Last Upated: Thursday, Feb 1, 2024

range

The Range field type is native to ACF (free) and provides an interactive experience for selecting a numerical value between specific endpoints.

Resolve Type

Fields of the "range" field type resolve to a "Float" in the GraphQL Schema.

Field Settings

Field Configuration

<?php
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group(
[
{
"key": "my_field_group_",
"title": "My Field Group with range",
"show_in_graphql": 1,
"graphql_field_name": "myFieldGroupWithRange",
"map_graphql_types_from_location_rules": 0,
"graphql_types": [
"Page"
],
"fields": [
{
"key": "my_field_",
"label": "My Field",
"name": "my_field",
"type": "range",
"show_in_graphql": 1,
"graphql_field_name": "myFieldWithRange"
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
}
]
]
}
]
);
});

Querying the Select Field