[pmwiki-users] ZAPdata savedata question
William Cole
eric at wanderinglighthouse.com
Sun Nov 19 01:09:46 CST 2006
Hi,
I'm using the code below to process multiple buttons on a form.
Different templates are loaded into the form depending on the button
clicked, using the (:include:) directive. While the (:if ... :)
conditionals and the (:include:) directive are working to give me the
results I would expect, the (:input hidden savedata ......:) within
the body of the (:if :)body(:ifend:), is not.
What I'm running into is that the (:input hidden savedata ......:)
saves the data whether or not the condition of the (:if :)body
(:ifend:), where it resides, is met.
Any tips, comments or pointers?
Thanks,
Eric
=============
(:zapdata:)
(:zapget:)
(:zapform:)
(:if equal {$MyAction} "View" :)
(:include Forms.ContactView:)
(:ifend:)
(:if equal {$MyAction} "Update" :)
(:include Forms.ContactUpdate:)
(:input hidden savedata "Field1,Field2,Field3,FieldTextArea":)
(:ifend:)
(:input hidden button "View" :)
(:input submit button "View":)
(:input submit button "Update":)
(:input hidden MyAction "{button}":)
(:input hidden passdata MyAction:)
(:input hidden nextpage:)
(:zapend:)
==============
More information about the pmwiki-users
mailing list