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

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon\Forms volt convert

Hi all How to convert <button type="submit" class="btn btn-primary">Sign in</button> in volt


    {{ submit_button('Sign in', "class" :"btn btn-primary") }}


Hi Raistlfiren {{ submit_button('Send', "class" :"btn btn-primary") }} = <input type="submit" value="Send" class="btn btn-primary"> not html button


I am sorry. It doesn't look like Phalcon supports the button. It looks like you will have to create the call for it using the Phalcon\Tag class. Here is how you can do it: http://docs.phalcon.io/en/latest/reference/tags.html#html5-elements-generic-html-helper


And here is the final result -

{{ tag_html("button", ["type": "submit", "class": "btn btn-primary"], false, true, true) }}
    Sign in
{{ tag_html_close("button") }}


Thank you Raistlfiren