Home » HTML » HTML_QuickForm » Bug #7108
Element include via QuickForm
Details
| Request #7108 | Element include via QuickForm |
|---|---|
| Submitted | 2006-03-13 14:36 UTC |
| From | michiel at dinnersite dot nl |
| Assigned | mansion |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | 4.4.0 |
| OS | Linux Mandrake 10 |
| Roadmaps | (Not assigned) |
Comments
[2006-03-13 14:36 UTC] michiel at dinnersite dot nl
Description:
------------
I have worked with QuickForm for a while now and I added a few elements and I altered some. Adding an element is very simple and doesn't require altering any of the code in QuickForm, overwriting certain elements unfortunatly does, the select element is an example.
The problem with the select element lays in the date element. In the date element the select element is included (HTML/select.php). Earlier in my form I included my custom select element. The result in this case is a error complaining about the html_quickform_select already being defined.
It would be nicer is the include would be controlled via de QuickForm class (static call). The method should check the $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] array for the filepath. and include the file mentioned in this array.
[2006-03-13 14:51 UTC] mansion at php dot net
can't you just name your element differently than 'select' ?
[2006-03-13 15:10 UTC] michiel at dinnersite dot nl
That would be a possible solution.
I do think it would be neater for all the elements to use the array to include files. This way QuickForm is more flexibel without any substational loss of speed.
[2006-03-13 15:12 UTC] mansion at php dot net
Array lookup and conditions are a substantial loss of speed especially if this is repeated many times. There is no need to add bloat to the class.