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

Text Area

ACF
Last Upated: Wednesday, Jan 24, 2024

text_area

The Text Area field is native to ACF (free) and provides users with a text area field to enter text.

Resolve Type

The "text_area" 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 textarea",
"show_in_graphql": 1,
"graphql_field_name": "myFieldGroupWithTextarea",
"map_graphql_types_from_location_rules": 0,
"graphql_types": [
"Page"
],
"fields": [
{
"key": "my_field_",
"label": "My Field",
"name": "my_field",
"type": "textarea",
"show_in_graphql": 1,
"graphql_field_name": "myFieldWithTextarea"
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
}
]
]
}
]
);
});

Querying the Text Area field

Previous
Text