[pmwiki-users] New cookbook recipe : BuildForms
Pierre Rouzeau
pierre at rouzeau.net
Tue Mar 8 17:49:34 CST 2005
Hello,
I just installed a new cookbook recipe for building HTML forms with
pmwiki markup :
http://www.pmwiki.org/wiki/Cookbook/BuildForms
I know there is already two forms recipe, but this one follow a
different approach and may serve different purpose (and was began before
issuing of the other stuff...). It was initially intended to make
configuration stuff and as a real world application, the skinnice recipe
was rewritten to use it.
It works like that :
(:frminit:)
(:frmbutton ok:)
(:frmtext name_x:)[[<<]]
(:frmcheck name_y:)
or, with more options:
(:frmfield name_z value="a value" disp="display that" regex="expression":)
(:frmbutton otherpost disp=gothat function=myfunction:)
(:frmend:)
It does allow :
- Fine layout control
- Easy translation of page (by modifying the 'disp' parameter)
- Adding complementary parameters (arbitrary named) to be passed to your
user function by a global variable (and also set in a file)
- Sending messages back to the form (:frmmsg msg_x:)
Documentation to be completed tomorrow or after (its late, here...)
A page for test can be found here :
http://rouzeau.net/w3/z.php5?n=Main.BuildForm
and the first realisation - revised skinnice addon:
http://rouzeau.net/w3/z.php5?n=Main.SkinConfig2
This recipe is making full use of the new function 'ParseArgs'
Though, i have a request: is it possible to pass an empty string as a
valid parameter? Yet if empty string passed the parameter is not
created, so considered not existing. As an example, i may want to
neutralise a display (because name is displayed by default), and i
should set a blank character to have the parameter taken into account.
Regards
Page principale - Main page - www.rouzeau.net <http://www.rouzeau.net>
---------------------------------------------------------------------------
More information about the pmwiki-users
mailing list