[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-general
Subject:    Re: [PEAR] QuickForm setDefault() strips curly braces and text between
From:       80.142.198.43
Date:       2006-12-28 8:46:46
Message-ID: 40.5E.11095.4A483954 () pb1 ! pair ! com
[Download RAW message or body]

Yes, my HTML_Template_Sigma stripped the curly braces, now set 
preserve_data true for template object. Works now.

Regards,
Hinnerk

Brett Bieber wrote:
> 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?
> 
> 

-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic