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

Form builder versus Volt, rendering a form object's elements in Volt without $form->render() ??

I would like to know if it is currently possible, or if there is a simple/easy way to have a form that has been built up in the form builder rendered in Volt.

This seems not entirely practical at this moment because you have to <?php $form->render('blah'); ?> breaking into PHP inside a volt template; am I wrong?

Basically, if I have a form that's an object, but I want to use partials in volt to render the elements, or render the form in volt somehow without calling $form->render('some_element'); how would I go about doing that?

Thanks in advance.

Rendering form elements in Volt

{{ form.label('element_name') }}
{{ form.render('element_name') }}


836

Thanks, I didn't see that calling method in the docs, and saw that people were adding their own functions other than the built in Volt functions so I incorrectly assumed you had to do something special.