# Panel | no textarea in a custom modal form

**URL:** https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293
**Category:** Questions
**Tags:** v2
**Created:** [January 16, 2017, 7:44am UTC](https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293 "2017-01-16T07:44:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AndreLehnert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andrelehnert/32/3519_2.png) [@AndreLehnert](https://forum.getkirby.com/u/AndreLehnert)
#### Post date: [January 16, 2017, 7:44am UTC](https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293/1 "2017-01-16T07:44:04Z")

</div>

Hi,  
I made a custom tag “question”. For this I registred a custom button with a modal form.  
It works fine. Only one behavior I dont understand. Why I can not use a textarea in my custom form?  
If I try, i get this error:

> “Method Buttons::\_\_toString() must not throw an exception, caught Error: Call to a member function url() on null”

All other fieldtypes are working. Here is, what I did:

**fields/textarea/forms/question.php**

```
<?php 
return function($page, $textarea) {
    $form = new Kirby\Panel\Form(array(
    'question' => array(
          'label' => 'Frage',
          'type' => 'text',// textarea doesnt work
          'placeholder' => '???',
          'autofocus' => 'true',
          'required' => 'true',
    ),
    'answer' => array(
          'label' => 'Antwort',
          'type' => 'text', // textarea doesnt work
    
    ),
    'h' => array(
          'label' => 'h',
          'type' => 'number',// textarea doesnt work
     )      
    ));

  $form->data('textarea', 'form-field-' . $textarea);
  $form->style('editor');
  $form->cancel($page, 'show');

  return $form;
};

```

Do you have any ideas? Thank you.

---

<div class="post-metadata">

### Author: ![lord-executor](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lord-executor/32/2229_2.png) [@lord-executor](https://forum.getkirby.com/u/lord-executor)
#### Post date: [January 17, 2017, 7:11am UTC](https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293/2 "2017-01-17T07:11:16Z")

</div>

I have little experience with custom panel extensions, but it sounds to me like Kirby’s textarea component needs to have _some_ sort of buttons setting when created manually - like when you want to customized your textarea in a blueprint [https://getkirby.com/docs/cheatsheet/panel-fields/textarea#customizing-buttons](https://getkirby.com/docs/cheatsheet/panel-fields/textarea#customizing-buttons) .

---

<div class="post-metadata">

### Author: ![AndreLehnert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/andrelehnert/32/3519_2.png) [@AndreLehnert](https://forum.getkirby.com/u/AndreLehnert)
#### Post date: [January 18, 2017, 11:14am UTC](https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293/3 "2017-01-18T11:14:26Z")

</div>

Thank you for your tip. Now it works with `buttons: false`. That’s great for my purpose.  
`buttons: true` does not work.

**fields/textarea/forms/question.php**

```
<?php
return function($page, $textarea) {

$form = new Kirby\Panel\Form(array(
    'question' => array(
        'label' => 'Frage',
        'icon' => 'question-circle',
       'type' => 'textarea',
        'buttons' => false ,  
        'placeholder' => 'Frage?',
        'autofocus' => 'true',
        'required' => 'true',
    ),
    'answer' => array(
        'label' => 'Antwort',
        'icon' => 'exclamation',
        'type' => 'textarea',
        'buttons' => false ,
        'placeholder' => 'Antwort.',
    ),
    'h' => array(
        'label' => 'Größe (1-6)',
        'icon' => 'header',
        'type' => 'number',  
        'min' => 1,
        'max' => 6
    )
));

$form->data('textarea', 'form-field-' . $textarea);
$form->style('editor');
$form->cancel($page, 'show');

return $form;

```

};

Thank you! André

---

<div class="post-metadata">

### Author: ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)
#### Post date: [February 6, 2025, 4:53pm UTC](https://forum.getkirby.com/t/panel-no-textarea-in-a-custom-modal-form/6293/4 "2025-02-06T16:53:01Z")

</div>


