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.

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



36.3k
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



12.6k
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.phalconphp.com/en/latest/reference/forms.html



19.4k

Hi Thien and Stefan,

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

Rgds

Stefan