We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Using Twitter Bootstrap/Font Awesome icons in Form Builder

Is there any way to set the value of a button in the forms builder to use HTML (not escaped) so that we can add icons from icon libraries to our buttons?

   $this->add(new Submit('Login', array(
        'class' => 'btn btn-success',
        'value' => 'Login <i class="fa fa-fw fa-sign-in"></i>'

If not I'll just stick to adding this element in the raw HTML.

thats awesome.

I would like to suggest you hack http://docs.phalcon.io/en/latest/api/Phalcon_Tag.html When you initialize di setAutoescape(false) to tag

The following allowed use of font awesome icon tags in form labels...

$di = new FactoryDefault();