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

Render form or simple volt

Hi again,

What are the differences between form.render and {{ text_field('email', 'class': "form-control") }}?

Is it just the external php file or are there also security advantages, or doesn't matter which i will use?

Rgds

Stefan



58.4k
edited Aug '15

Hey

When you use form.render it mean you split code that is easy maintaner code, also you can use bind form of Phalcon, for example here and you can validate in form



16.0k
Accepted
answer

text_field is for creating a simple html field.

I recommed you going with forms and take advantage of all the features like filtering, sanitization, flash messages, binding etc. Is better for security and easier to mantain your code

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



60.0k

Hi Thien and Stefan,

thx for your fast reply. I will render forms :-)

Rgds

Stefan