Re: QuickForm setDefault() strips curly braces and text between "{some text}"
| From: | Brett Bieber | Date: | Thu, 28 Dec 2006 02:01:18 +0000 |
| Subject: | Re: QuickForm setDefault() strips curly braces and text between "{some text}" | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26214@lists.php.net to get a copy of this message | ||
On 12/27/06, Hinnerk Voss <mail@hinnerk-voss.de> wrote:
Hi, I set a textarea with $form->setDefaults($result); $form->addElement('textarea', 'de', 'Deutsch:', array("rows"=>"10")); $output .= $form->toHtml(); $results contains text for textarea (I've checked $results with print_r, all {} there): "sometext with {curly braces} and more" but it outputs "sometext with and more" to the browser. How can I protect {} for output?Eh? Strange. This works fine for me, try it for yourself: <?php require_once 'HTML/QuickForm.php'; $form = new HTML_QuickForm(); $form->addElement('textarea', 'de', 'Deutsch:', array('rows'=>'10')); $form->setDefaults(array('de'=>'This is {curly brace} stuff')); echo $form->toHtml(); ?> How are you setting the defaults...? What is the contents of $result ? It should be an associative array with keys corresponding to the quickform element names. Are you using a renderer other than the default? -- -Brett http:saltybeagle.com aim:ianswerq