For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > February 2006 > QuickForm(_Controller): Conditional Forms based on rule match









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author QuickForm(_Controller): Conditional Forms based on rule match
Christopher Kunz

2006-02-22, 7:58 am

Hi,

I'm trying to create a whois form with QuickForm / QuickForm_Controller (I need
multipage forms since the whois form is supposed to lead to the order form for
web hosting services). So far, I have implemented the actual whois as a callback
function to a wrapper around Net::Whois, so I can tell when a domain is taken or
otherwise unavailable.
However, in this case I want to change the form to display alternative domains
(which have to be whois'ed on the fly too) and a different "next" action for
transferring the domain. I have tried to implement this using a session variable
set by the whois callback function, but this only works after submitting the
first step of the form *twice*.
Is there a "nice" way of implementing a conditional change of a form after a
specific rule has matched during the validate() method?

Regards,

--ck

--
http://www.de-punkt.de [ chris@de-punkt.de ] http://www.stormix.de
PHP-Anwendungen sind gefährdet! SQL-Injection, XSS, Session-Angriffe,
CSRF, Commandshells, Response Splitting,... böhmische Dörfer? Dann gleich
"PHP-Sicherheit" direkt beim Verlag vorbestellen! http://www.php-sicherheit.de/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com