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

Some extras to Phalcon\Forms\Element?

Maybe it's a dumb question, but in my opinion type="tel" could be already built-in to the Phalcon\Forms\Element library?

In latest browsers more and more input types get supported and even if tel (for example) isn't supported by browser then it falls back to type="text".

Also, since the html5 it became pretty popular to tweak the looks of radio and check buttons, by wrapping the input in label and adding a span for the text, something like:

<label><input type="checkbox"><span>Label</span></label>

Of course I can achieve this by writing a custom element render function in form (which I am currently doing), because {{ element }} {{ element.label() }} won't do the trick, but maybe It could be more simple and dynamic?



3.4k

Are you asking if Phalcon\Forms\Element has the ability to define custom inputs and outputs?