We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

textarea shows no content

This one works: {{ content1 }} This one gives textarea with test as content: <textarea>test</textarea>

These 2 give a textarea without the content??? {{ text_area("comment", "This is the content", "cols": "6", "rows": 20) }} <?php echo Phalcon\Tag::textArea(array( "comment", "test", "cols" => "6", "rows" => 20 )) ?>

many thanks Raymond



4.1k

Now using <textarea>{{ comment }}</textarea>



98.9k

It must be:

{{ text_area("comment", "value": "This is the content", "cols": 6, "rows": 20) }}


8.1k
edited Apr '14

Note that the use of textarea is not properly documented @ https://docs.phalcon.io/en/latest/reference/tags.html (Lack of the 'value' key.)

Also, a textarea doesn't have a 'value' attribute, but Phalcon does set this (next to using the value of 'value' for setting the content of the textarea element).

Edit: created an issue for this: https://github.com/phalcon/cphalcon/issues/2357