---
agentTools:
  projectIndex: https://olympus.readme.io/llms.txt
---

# Textarea

[block:code]
{
  "codes": [
    {
      "code": "<?php\n\n$tea_content = array(\n    array(\n        'type' => 'textarea',\n        'title' => 'How do Penguins drink their cola?',\n        'id' => 'my_textarea_field_id',\n        'default' => 'On the rocks.',\n        'placeholder' => 'Tell us how?',\n        'description' => 'A simple question to know if you will be able to survive to the Penguin domination.',\n    ),\n);",
      "language": "php"
    }
  ]
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/fU6urz2uQmJI1Fz5DiZA_textarea.png",
        "textarea.png",
        "1233",
        "257",
        "#4a577d",
        ""
      ]
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Retrieve data"
}
[/block]

Using the `_get_option('my_textarea_field_id')` method, you'll get (with a `json_encode()` display):

[block:code]
{
  "codes": [
    {
      "code": "\"On the rocks.\"",
      "language": "json"
    }
  ]
}
[/block]