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

Tag::form() and the closed form tag

HI all, is there a way to omit the closing </form> tag while using Tag::form() directive? Mixing php and html in this case looks very weird. Instead, better use something like <?php Tag::beginForm($constructorOptions); ?> //form elements <?php Tag::endForm(); ?>

or something similar.



98.9k

Hi, actually, Tag::form() does not produce the </form> tag

Incredible mix of php 'opening' form tag using Tag class and plain html closing tag :O Do you consider to add syntax like I wrote above (or similar) inside of the core helpers?



98.9k
Accepted
answer
edited Oct '14

That is already implemented:

Tag::form() -> open form -> <form ...>
Tag::endForm() -> close form -> </form>

Yep! That exactly about I wrote above. Thanks!