ZAP-Talk

Summary: Talk page for ZAP Form Processor.
Maintainer: (unsupported since 2008)
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

I would like to use the Zap forms to send an email however I would like to dynamically create the email subject based on the data entered in the form - would something like this be possible? Karl - 7-1-2008


Hi, Karl. Yes, you can use any value entered in the form as a variable within (:zap:) tags by enclosing its name in {braces}, so for instance if you have a field named Subject, you could construct a custom subject line with

(:zap emailsubject="Mail from my Zap form: {Subject}":)

Hope that helps. Ben Stallings July 02, 2008, at 11:27 AM


Ben, Thanks for your response. Unfortunately, the change did not produce the desired results. The syntax, I used was:

(:zapform:)
(:zap email="test@abc.com":)
(:zap emailsubject="{Name1} {Name2} - Email Subject":)
(:zap emailfrom="test@abc.net":)
(:input text Name1:)
(:input text Name2:)
(:zap emailtemplate="Main.TestTemplate":)
(:input submit value="Submit":)
(:zapend:)

The resulting email subject was: {Name1} {Name2} - Email Subject


I updated zap to work with $SiteAdminGroup Variable rater than $SiteGroup. This is an important security fix, cause Zap don't allow to write in this group. Since I'm not a programmer someone with thous skills blease verify the changes. zap_2007-12-04.phpΔ

 if ((($vv[0] == $SiteAdminGroup) || ($vv[0] == "Site")) && ($EnableZAPsiteEdits != true))
 ZAPabort('site', "Group $SiteAdminGroup is blocked on this system. ");
  • to:
 if ((($vv[0] == $SiteAdminGroup) || ($vv[0] == "SiteAdmin")) && ($EnableZAPsiteEdits != true))
 ZAPabort('site', "Group $SiteAdminGroup is blocked on this system. ");

I did not check your work but this is an important upgrade. Thanks! Caveman


Please help! Running zap+zaptoolsbox I obtain:

Fatal error: Call to undefined function: pagetextvar() in /home/httpd/vhosts/poincare.org/subdomains/chronos/httpdocs/cookbook/zap.php on line 326

You must upgrade to PmWiki 2.2, as ZAP requires its PTV capabilities. Caveman


Please Help me, too.

I'm running a ZAP as a newsletter system on a webside to protest against water privatisation. Thus, it's not a wiki, I handle it with a login section. If you're not logged in, the newsletter gives back an error. How can I make this work for not logged-in users? I would be in debt to everyone who'll treat this as a matter of urgent. [(approve links) edit diff] -- Chris


Greetings,

I seem to be having an issue I just can't figure out. I installed the cookbook recipe ZAP (as well as the Tool box) to send a "mailing list" type form to an e-mail address. Initially, I adapted the example listed above by using the following markup:

!Join our mailing list!

(:messages:)
(:zapform:)
(:zap email="info@example.com":)
(:zap emailfrom="info@example.com":)
(:zap emailsubject="Website Feedback Form":)

||First Name: ||(:input text emailbody:)
||Last Name: ||(:input text emailbody:)
||Email: ||(:input text emailbody size=30:)
||Comments: ||(:input textarea emailbody cols=30 rows=4:)
|| ||(:input submit value="Submit":)
(:zap nextpage="Main.Thanks":)
(:zapend:)

The result does indeed send an e-mail, but it only contains the final form field (in this case only what is entered in the comments field). The first and last names and (most importantly) the e-mail field are not sent at all. I tried a number of combinations thinking that possibly only one instance of "emailbody" was required with the same results: ...

||First Name: ||(:input text firstname:)
||Last Name: ||(:input text lastname:)
||Comments: ||(:input textarea emailbody cols=30 rows=4:)

...

I am running pmwiki-2.2.0. Any thoughts on what might be causing this? Your help would be most appreciated.

Thanks in advance, -Matt


I like to use ZAP to set and change PV in a easy way.

My script:

(:zapform:)
||Summary:  ||(:input text "Summary" '{$:Summary}':)
||Category: ||(:input select Category "Instruction":) (:input select Category "Information":) 
(:input submit value="Save":)
(:input hidden savedata "Summary,Category":)
(:zapend:)

Summary: {$:Summary}
Category: {$:Category}

So far it works. I'm able to set the values. And when I open the page again the value "Summary" will be preset to what I typed in.
But how can I preset the input select Category to "Information"?

Thanks

Andreas Sep. 8, 2010

Update: It works not correct: If I type for Summary more than one word, for example "new Summary", the variable will be set to "new Summary" but the preset in the input field is just "new". I have to make ' around the {$:Summary}.


Hi
When I try to use the following link -- http://zapdoc.web-farm.org -- my antivirus software blocks access and states that there is something malicious on the site. So either be careful using the link or perhaps someone could check it please

cheers Bob


Online docs don't seem to be available any more. This package looks powerful so here are some notes about how to use it that I discovered by experimenting and looking at the code:

To get the recipe to send emails add the following to your config.php

$ZAPmailmode = true;
include_once("$FarmD/cookbook/zap/zap.php");
include_once("$FarmD/cookbook/zap/zaptoolbox.php"); 

The following worked for me:

(:messages:)

(:zapform:)
(:zap email="to@domain.com":)
(:zap emailfrom="from@domain.com":)
(:zap emailsubject="Automated Webmail":)

||Name:    ||(:input text name:)
||Message: ||(:input textarea message cols=30 rows=20:)
||         ||(:input submit value="Submit":)

(:comment default template will be Group.Page-template if not set otherwise:)
(:zap emailtemplate="Main.Contact-template":)
(:zap nextpage="Main.Thanks":)
(:zapend:)

And then the syntax for the template is something like this:

{$$name} wrote:

{$$message}

Here's an easy way to manage a new install if you can use FixFlow or Gemini with ToolTip and ShowHide installed. This download contains GroupHeaders and Index pages that give constant access to all files as you develop your pages and uses. Use or change the background gif, as you please.

Use these snippets, one in the Site.PageTopMenu page, and the other in the config.php file to complete the picture of availability.
In Site.PageTopMenu
>>lnav<<
* [[{$DefaultGroup}|$[Home] ]]
* '''[[{*$Groupspaced}]]'''
* '''[[{*$Namespaced}]]'''
In config.php
$GroupHeaderFmt = '(:include $Group.GroupHeader:)(:nl:)';

In Site.PageTopMenu

Just trying to be helpful.

Talk page for the ZAP Form Processor recipe (users?).