Advanced usage of HTML_QuickForm - A dynamically changing form!

From: Date: Tue, 19 Oct 2004 20:22:19 +0000
Subject: Advanced usage of HTML_QuickForm - A dynamically changing form!
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14974@lists.php.net to get a copy of this message
I've recently rewitten a form I hacked together a while back that allows you to build a form up by selecting options which add fields to the form. It maintains a list of current elements in a hidden element called VIEWSTATE (no prizes for working out where my inspiration came from there.) It's hard to explain, so perhaps you should look at the code... The reason for the code won't make much sense to people who don't know RADIUS well, but I am posting it to the list as an example of how HTML_Quickform can be used for more then just 'simple' forms. Whilst mine loads selectbox information from a database, it would be easy to hack so it doens't should you want to setup a working version. I hope this is of some use to people, perhaps an alteration of this example might make it in to the examples folder of HTML quickform. The viewstate isn't 'secure'. I have no need to make it so either, it's for internal use. Wouldn't be too hard to make secure it though. Example: http://pookey.co.uk/pear/qf_dynamic.php Code: http://pookey.co.uk/pear/qf_dynamic.phps Feedback welcome. Hope this helps Ian P. Christian http://pookey.co.uk

« previous php.pear.general (#14974) next »