We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon\Forms volt convert

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

https://docs.phalcon.io/en/latest/reference/volt.html

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


58.4k

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

duythien,

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: https://docs.phalcon.io/en/latest/reference/tags.html#html5-elements-generic-html-helper



4.6k
Accepted
answer

And here is the final result -

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


58.4k

Thank you Raistlfiren