-
Looking at the manual and github, there are some forms parts that exist in Phalcon\Tag but not in Phalcon\Forms\Element. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
That whole namespace (Forms/HTML Elements) is to be reworked at some point in the future. There has been some work done for v5 but it is not fully complete. The idea is that for the forms you would pass an Html Helper factory which will allow you to create any number of elements that are available. If you want you can open an issue but note it will be addressed after v5 is out, possibly in v6 |
Beta Was this translation helpful? Give feedback.
-
Have a look here: https://github.com/phalcon/cphalcon/blob/5.0.x/phalcon/Forms/Element/AbstractElement.zep#L521 This is the For now it is used to generate the necessary HTML per element What you can also do is create an element class yourself for time like this namespace Phalcon\Forms\Element;
use Phalcon\Tag;
/**
* Phalcon\Forms\Element\Time
*
* Component INPUT[type=time] for forms
*/
class Time extends AbstractElement
{
/**
* @var string
*/
protected $method = "inputTime";
}
The way things are now we have one class for forms one for HTML and we need to merge those somehow or at least create elements such as the implementation above to keep those two namespaces in sync. |
Beta Was this translation helpful? Give feedback.
Have a look here:
https://github.com/phalcon/cphalcon/blob/5.0.x/phalcon/Forms/Element/AbstractElement.zep#L521
This is the
tag
service that is used by each element. In the future we will rework this so that it is automatically injected in the constructor of the element as well as the form itself.For now it is used to generate the necessary HTML per element
What you can also do is create an element class yourself for time like this
inputTime
is a s…