This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

[Solved] Render problem with sfWidgetFormInputCheckbox obj.

Discussion relating to version 1.2.x stable

[Solved] Render problem with sfWidgetFormInputCheckbox obj.

by nervus70 » Sun Mar 11, 2012 2:44 pm

Hello,

I have a problem with the render method of this class.
When I try to do :

echo $myObject->render('field_name'); // For example

the string returned si not :
Code: Select all
<input type="checkbox" name="field_name" checked="checked" id="field_name" />


but :
Code: Select all
&lt;input type=&quot;checkbox&quot; name=&quot;field_name&quot; checked=&quot;checked&quot; id=&quot;field_name&quot; /&gt;


Why ? What can I do ?

I see nothing in the api documentation about it. The only way is to do : html_entity_decode() on the string, and it sucks.

Thank you very much
nervus70
Junior Member
 
Posts: 6
Joined: Sat Feb 04, 2012 8:17 pm

Re: Render problem with sfWidgetFormInputCheckbox object

by nervus70 » Sun Mar 11, 2012 4:16 pm

This is crazy it's not the method render the problem.

In my controler I put this code :
Code: Select all
$this->test = '<input type="checkbox" />' :


In my template I pute this code :
Code: Select all
echo $test;


It show :
Code: Select all
&lt;input type=&quot;checkbox&quot; /&gt;



I'm gonna become crazy...
nervus70
Junior Member
 
Posts: 6
Joined: Sat Feb 04, 2012 8:17 pm

Re: Render problem with sfWidgetFormInputCheckbox object

by nervus70 » Sun Mar 11, 2012 10:31 pm

Ok I found the solution by myself.

The thing is in the settings.yml

Code: Select all
escaping_strategy:      true


I changed the value to "false" and the problem was solved.
nervus70
Junior Member
 
Posts: 6
Joined: Sat Feb 04, 2012 8:17 pm