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

Email

ACF
Last Upated: Thursday, Feb 1, 2024

email

The Email field is native to ACF (free) and provides an email input, used for storing email address values.

Resolve Type

The "email" field type resolves as a "String" 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 email",
"show_in_graphql": 1,
"graphql_field_name": "myFieldGroupWithEmail",
"map_graphql_types_from_location_rules": 0,
"graphql_types": [
"Page"
],
"fields": [
{
"key": "my_field_",
"label": "My Field",
"name": "my_field",
"type": "email",
"show_in_graphql": 1,
"graphql_field_name": "myFieldWithEmail"
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
}
]
]
}
]
);
});

Querying the Email field