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

Custom button (non submit) in Phalcon Form Elements

Hello everyone!

I want to know how can I make a normal button using Phalcon Form Elements, or a better, a link. I'm making a custom web form, with buttons, links, labels, etc...

I need something like <a href="/some/link/" target="_blank" class="btn btn-primary">GO TO SOME LINK</a>

I'm using Twitter's Bootstrap 4. The volt is copiled with a form that loop thru /app/forms/AwesomeForms.php

Thanks!



32.2k
Accepted
answer

Hi @falkdav in php or php templates you can use tag service to generate your links: Tag::linkTo() if you are using Volt use this {{ link_to() }}. Parameters are the same.

Custom form elements documentation

Good luck