View Full Version : Multiple lines in the value of TextArea?

20 Feb 2009, 5:34 PM

I have the following problem:
I have a FormPanel with a textarea inside. The "value" of the textarea is taken from a PHP variable with is echoed into the value. If the variable is a single line without any special chars, like enter, ' or " it works perfectly. Whenever the user enters an extra line the form never shows up.

Here is a snippet:

items: [{
xtype: 'textarea',
fieldLabel: 'Area content',
name: 'cpg_area_content,
width: '500',
height: '300',
value: '<?=$cpg_area_content?>'
How can I get the value to come from the PHP variable? I must be missing something here.


20 Feb 2009, 7:02 PM
<?php echo str_replace("\\n", "<br>", $_GET['data']) ?>