I want to add custom html attributes to CHtml widget (for example, event listener), so I pass htmlOptions array:
array('onchange' => 'myFunction('MyValue')')
But resulting HTML looks like this:
onchange="myFunction('MyValue')"
How can I disable attributes encoding?
will
(Phpwindcn)
2
Quote
I want to add custom html attributes to CHtml widget (for example, event listener), so I pass htmlOptions array:
array('onchange' => 'myFunction('MyValue')')
But resulting HTML looks like this:
onchange="myFunction('MyValue')"
How can I disable attributes encoding?
I think it's a CHTML bug, there is a ticket created for this, please see
http://www.yiiframew…2.html#msg10112
Oh, I see, thanks.
Ok, I will wait for next release.