[pmwiki-devel] Question about Forms & Actions

Ben Stallings Ben at InterdependentWeb.com
Mon Dec 11 15:38:27 CST 2006

Hans wrote:
>> I realize I may be the only person who's ever tried putting ZAP in an
>> EditForm, but once you see it in action, so to speak, you'll all want to
>> do it.  ;-)
> I am curious how you set that up / what your Editform source looks like.

OK, by popular demand, here's the EditForm hack...

Put the following lines into config.php or some recipe (mine is 
currently in DataQuery, though I'll move it out of there soon as I'm 
dividing what was to be DataQuery into a series of more specialized 

$group = FmtPageName('$Group',$pagename);
$name = FmtPageName('$Name',$pagename);
$specialpages = array('EditForm','RecentChanges','GroupHeader', 
if ((PageExists($group.".EditForm")) and !in_array($name,$specialpages)) 
and ($name != $group)) $PageEditForm = '$Group.EditForm';

You can then create a custom EditForm or ZAP form for each page group. 
Be sure to use the {*$Var} syntax to get ZAP values from the included 
page or {*$:Var} for page text variables.

I'll plan to have a working demo of this up sometime tomorrow.  Sorry 
it's taken so long... I'm easily distracted lately.  --Ben

More information about the pmwiki-devel mailing list