[PEPr] +1 for HTML::HTML_QuickForm2_Captcha

"Bertrand Mansion" <[email protected]>
Newsgroups gmane.comp.php.pear.devel
Message-ID <[email protected]>
Bertrand Mansion (http://pear.php.net/user/mansion) has voted +1 on the proposal for HTML::HTML_QuickForm2_Captcha.

Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=632
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=632&handle=mansion

Comment:

Here are some suggestions:



You can fill $this->data defaults in the properties of your class instead
of the constructor since you are just extending Input that does nothing
with them. (Like what you did for attributes).



$sessionPrefix could be set using the $data parameter.



The question should probably be the label ->setLabel()



Or maybe you should extend Container instead (my recommandation if you find
a way to do that, it's more flexible because then you can use the dom like
api to change the elements) and use $this->addStatic() and $this->addText()
depending on the elements you want to add.

I don't think it is a very good idea to add a div around these elements,
this should probably be left to the renderer.



If you use a Container, you can also use $attributes in the constructor
instead of $this->data['captchaHtmlAttributes']. Remember that all the
elements extend HTML_Common2 that has utility methods to deal with
attributes.



Recaptcha doesn't seem to need a session, maybe you should treat it as a
totally different element on its own instead of a subclass of Captcha.



Nevertheless, it is all useful as is, good work.

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.