[pmwiki-users] PmForm: manipulate data?

2018-04-03 Thread Johan Bengtsson

I'm trying to use PmForm as a mail form.

Is it possible to use markup expressions to change the data from form fields
before it's being mailed?

-Johan Bengtsson

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform not working with php 5.5.26

2015-07-09 Thread Petko Yotov

Have you enabled/defined some of these variables?
  $PmFormMailParameters
  $PmFormMailHeaders
  $EnablePmFormMailSubjectEncode

Does the core Notify feature work?
  http://www.pmwiki.org/wiki/PmWiki/Notify

Petko

On 2015-07-09 21:44, Daniel wrote:

When I send a form by email, I get the following error:

Warning: mail(): Multiple or malformed newlines found in
additional_header in
/home/w0247690/domains/kropveld.net/public_html/cookbook/pmform.php on
line 297

One of the forms is in
http://www.kropveld.net/Wesp/EnqueteLS

After filling in the form, I ge this error, and no mail is sent.

The form used to function well, I suspect my provider recently  
upgraded

to php version 5.5.26

see http://kropveld.net/phpinfo.php

Just now I upgraded tot the latest pmwiki and pmforms, but no fix.



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform not working with php 5.5.26

2015-07-09 Thread Daniel


Op 09-07-15 om 22:12 schreef Petko Yotov:
 Have you enabled/defined some of these variables?
   $PmFormMailParameters
   $PmFormMailHeaders
   $EnablePmFormMailSubjectEncode

Not in config.php

 Does the core Notify feature work?
   http://www.pmwiki.org/wiki/PmWiki/Notify

Looks like is does not...


Additional info, this pmform mailform is working well:

http://www.kropveld.net/Main/MailDanielEng

Maybe you can have a look in

http://www.kropveld.net/Site/LocalTemplates
to see if something is wrong here. But I doubt it, because up to 16:00 I
received mails from this form, and then suddenly it stopped.

In the meantime, I will contact my provider.

thanks,
Daniel
http://kropveld.net


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform not working with php 5.5.26

2015-07-09 Thread Daniel
When I send a form by email, I get the following error:

Warning: mail(): Multiple or malformed newlines found in
additional_header in
/home/w0247690/domains/kropveld.net/public_html/cookbook/pmform.php on
line 297

One of the forms is in
http://www.kropveld.net/Wesp/EnqueteLS

After filling in the form, I ge this error, and no mail is sent.

The form used to function well, I suspect my provider recently  upgraded
to php version 5.5.26

see http://kropveld.net/phpinfo.php

Just now I upgraded tot the latest pmwiki and pmforms, but no fix.

Can anybody help me out with this?

Thanks,
Daniel
http://www.kropveld.net

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmForm questions

2015-04-28 Thread Petko Yotov

Sorry, PmForm doesn't have any of the features you require.

Petko

On 2015-04-28 16:40, erik burggraaf wrote:

a way for members of my organization to maintain their own user
profiles.  I want each member to be able to see their own profile, but
not anyone elses.  I also want the information stored in some kind of
database.  It needs to be easy to back up, but I really don't want
anything as hokie as a CSV file.

finally, just to stretch the envelope a bit, I want users to be able
to register online for various things.  Can I use pmform for this, or
do I need other extensions?  We need to collect registration feas and
I know I'll need other scripts for that.



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmForm questions

2015-04-28 Thread erik burggraaf
Hi all,

I'm wondering about PMForm and whether it will meet my needs.  I need a way for 
members of my organization to maintain their own user profiles.  I want each 
member to be able to see their own profile, but not anyone elses.  I also want 
the information stored in some kind of database.  It needs to be easy to back 
up, but I really don't want anything as hokie as a CSV file.

finally, just to stretch the envelope a bit, I want users to be able to 
register online for various things.  Can I use pmform for this, or do I need 
other extensions?  We need to collect registration feas and I know I'll need 
other scripts for that.

Thanks,

Erik


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm wiki merged back to the main wiki

2015-04-26 Thread Petko Yotov

Hello,

For a few years the PmForm recipe had its documentation and demos at a 
separate wiki installation. It proved to take more time and efforts to 
review and cleanup


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm wiki merged back to the main wiki

2015-04-26 Thread Petko Yotov

Hello,

For a few years the PmForm recipe had its documentation and demos at a 
separate wiki installation. It proved to take too much time and effort 
to review and cleanup the spam, so I merged it back to the main site, 
the PmForm group:


  http://www.pmwiki.org/wiki/PmForm/PmForm

All previous locations should automatically redirect to the new pages, 
but it may be a good idea to update your bookmarks.


If you notice some problems with the group please notify me.

Petko


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform question

2015-01-28 Thread Petko Yotov

On 2015-01-28 18:00, Daniel wrote:

But, I noticed the existence of {$CurrentTime}
Isn't it simpler just to use that?


Does it work? {$CurrentTime} is not a PageVariable in the default 
installation so unless you or a recipe define it, it will not work.


Petko


Op 27-01-15 om 22:15 schreef Petko Yotov:

Use something like this:

  (:input text datetime {(ftime)}:)

or:

  (:input hidden datetime2 {(ftime)}:)

Petko

On 2015-01-25 19:16, Daniel wrote:

Hello,
I want to add the current date in a form sent to me, using the ftime
function (Seen in 
http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions)


I used (ftime) but that didn't work, I also tried using
{(ftime)}, {$ftime}, {$$ftime} {$$(ftime)} {($$ftime} {$(ftime)} :(

Can anybody tell me how to use the ftime function correctly in a 
pmform?

(Or.. which variant is missing here ? :) )



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform question

2015-01-28 Thread Daniel
Yes it works.

But, I noticed the existence of {$CurrentTime}
Isn't it simpler just to use that?

Gr, Daniel Kropveld
http://hetVondelpark.net

Op 27-01-15 om 22:15 schreef Petko Yotov:
 Use something like this:
 
   (:input text datetime {(ftime)}:)
 
 or:
 
   (:input hidden datetime2 {(ftime)}:)
 
 Petko
 
 On 2015-01-25 19:16, Daniel wrote:
 Hello,
 I want to add the current date in a form sent to me, using the ftime
 function (Seen in http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions)

 I used (ftime) but that didn't work, I also tried using
 {(ftime)}, {$ftime}, {$$ftime} {$$(ftime)} {($$ftime} {$(ftime)} :(

 Can anybody tell me how to use the ftime function correctly in a pmform?
 (Or.. which variant is missing here ? :) )
 
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform question

2015-01-27 Thread Daniel
Hello,
I want to add the current date in a form sent to me, using the ftime
function (Seen in http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions)

I used (ftime) but that didn't work, I also tried using
{(ftime)}, {$ftime}, {$$ftime} {$$(ftime)} {($$ftime} {$(ftime)} :(

Can anybody tell me how to use the ftime function correctly in a pmform?
(Or.. which variant is missing here ? :) )

Thanks, Daniel

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform question

2015-01-27 Thread Petko Yotov

Use something like this:

  (:input text datetime {(ftime)}:)

or:

  (:input hidden datetime2 {(ftime)}:)

Petko

On 2015-01-25 19:16, Daniel wrote:

Hello,
I want to add the current date in a form sent to me, using the ftime
function (Seen in http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions)

I used (ftime) but that didn't work, I also tried using
{(ftime)}, {$ftime}, {$$ftime} {$$(ftime)} {($$ftime} {$(ftime)} :(

Can anybody tell me how to use the ftime function correctly in a 
pmform?

(Or.. which variant is missing here ? :) )



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm RSVP Form - Radio button issue

2014-07-08 Thread Criss Ittermann
HI,

I've tried several ways to get the radio button (for Yes or I'll be there.) 
selected automatically in the RSVP form I posted on PmForm.

I tried selected, selected=selected, selected=1.  I also tried using an input 
default.  i'm not seeing the selected option being sent to the HTML.

Not vital, but would be one less annoyance for the user of the form to have 
yes preselected.


[[#rsvpform]]
(:input pmform target=rsvp :)
(:input default request=1:)
(:input default anchor=I'll be there.:)
(:input default author {$Author} :)
'''Please RSVP for the event:'''
red
(:messages:)

%comment% $[Subject]:  (:input text Subject size=30:)
Name: (:input text author:)
||width=50%
||(:input radio anchor selected=selected I'll be there. :) Yes ||(:input 
radio anchor I can't make it.:) No ||(:input radio anchor I might be 
there.:) Maybe ||
(:input submit post Submit:)
(:input end:)
[[#rsvpformend]]

[[#rsvppost]](:template defaults where=bottom :)(:template require author 
errmsg=$[Missing name]:)(:template require author match=-*:*,-*@*,-**,-** 
errmsg=Please just enter your name.:)(:template require Subject match= 
errmsg=$[Please leave the subject field blank] :)*{$$anchor} ~{$$author}
[[#rsvppostend]]


Crisses


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm RSVP Form - Radio button issue

2014-07-08 Thread Petko Yotov

Criss Ittermann writes:
I've tried several ways to get the radio button (for Yes or I'll be  
there.) selected automatically in the RSVP form I posted on PmForm.


I tried selected, selected=selected, selected=1.  I also tried using an input  
default.  i'm not seeing the selected option being sent to the HTML.



(:input radio anchor selected=selected I'll be there. :) Yes


Radio buttons and checkboxes are checked with the checked attribute:

 (:input radio anchor I'll be there. checked=checked:)


To learn more look into any HTML reference, for example:

 https://developer.mozilla.org/en/docs/Web/HTML/Element/Input
 http://www.w3schools.com/tags/tag_input.asp

Petko


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm RSVP Form - Radio button issue

2014-07-08 Thread Criss Ittermann

On Jul 8, 2014, at 2:28 PM, Petko Yotov 5...@5ko.fr wrote:

 Criss Ittermann writes:
 I've tried several ways to get the radio button (for Yes or I'll be 
 there.) selected automatically in the RSVP form I posted on PmForm.
 
 I tried selected, selected=selected, selected=1.  I also tried using an 
 input default.  i'm not seeing the selected option being sent to the HTML.
 
 (:input radio anchor selected=selected I'll be there. :) Yes
 
 Radio buttons and checkboxes are checked with the checked attribute:
 
 (:input radio anchor I'll be there. checked=checked:)
 
 
 To learn more look into any HTML reference, for example:
 
 https://developer.mozilla.org/en/docs/Web/HTML/Element/Input
 http://www.w3schools.com/tags/tag_input.asp

I did search.  But because I was searching on selected, of course it was 
unhelpful.  Thanks for pointing out my mistake.  I ended up on completely 
different pages which only confused the issue more.

And the input default failed due to an equal sign:
(:input default anchor=I'll be there.:)
needed to be 
(:input default anchor I'll be there.:)

Argh.  Two cases of semantics over intuition.

Thank you again.
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm and uninvited links

2014-02-13 Thread Petko Yotov

Randy Brown writes:
PmForm seems to be creating a link to my profile page, uninvited. I see this  
when I search for link=Profiles.MyProfile, even though I'm not aware of  
having created such a link.


I have several pages interacting:

1. MyData: contains a pmform directive that uses MyTemplate (which is in  
LocalTemplates). Save updates the page text variables on this (MyData)  
page. 


2. MyTemplate: (:include:)s other pages, which in turn may include still  
other pages. Note that the includes can be recursive, and can involve  
including an anchored section on the current page. Still, my understanding is  
that links are only indexed if the markup is literally on the page itself. 


Not exactly. When a page is saved, the markup it contains is evaluated, that  
is, the wikitext is converted to HTML, in order to keep track of the link  
targets.


With a few exceptions: redirects, inclues, conditionals, pagelists,  
searchresults, and wikitrails are not evaluated. The (:include ...:)  
markups on the page are replaced with   (space) before the text is  
evaluated, same for the other markups.


That means that all other markup, including (:pmform:), will be evaluated  
and if it contains a WikiLink, it will be indexed.


You can disable the evaluation of the (:pmform:) markup by adding this to  
config.php:


 $SaveAttrPatterns['/\\(:pmform(\\s+.*?)?:\\)/i'] = ' ';

I wonder if this should be added to the pmform.php file.

Petko



Here are some things I've tried, each time re-saving the MyData page to  
refresh the link index:



1. I replace the pmform directive on MyData with a directive to simply  
(:include:) MyTemplate. Good result: the uninvited link disappears. 



2. I return pmform to MyData, but now omit from MyTemplate the include of the  
other page. Good result: the uninvited link does NOT reappear.



3. I make MyData page contain only one line: (:pmform…:). Bad result: the  
uninvited link re-appears.



4. If I delete MyData (in case there was some kind of corruption) and try  
again, I get the same results.



What could cause this?


Randy


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm and uninvited links

2014-02-12 Thread Randy Brown
PmForm seems to be creating a link to my profile page, uninvited. I see this 
when I search for link=Profiles.MyProfile, even though I'm not aware of having 
created such a link.

I have several pages interacting:

1. MyData: contains a pmform directive that uses MyTemplate (which is in 
LocalTemplates). Save updates the page text variables on this (MyData) page. 

2. MyTemplate: (:include:)s other pages, which in turn may include still other 
pages. Note that the includes can be recursive, and can involve including an 
anchored section on the current page. Still, my understanding is that links are 
only indexed if the markup is literally on the page itself. 

Here are some things I've tried, each time re-saving the MyData page to refresh 
the link index:

1. I replace the pmform directive on MyData with a directive to simply 
(:include:) MyTemplate. Good result: the uninvited link disappears. 

2. I return pmform to MyData, but now omit from MyTemplate the include of the 
other page. Good result: the uninvited link does NOT reappear.

3. I make MyData page contain only one line: (:pmform…:). Bad result: the 
uninvited link re-appears.

4. If I delete MyData (in case there was some kind of corruption) and try 
again, I get the same results.

What could cause this?

Randy___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-22 Thread shout
 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 
 
 I want a page variable useform containing the get _or_ post
 parameter useform. Not so important, though.

sorry for the late reply. I am quite busy as of late. thank you for the 
detailed explanation. now I do understand why you want a one line solution. 
can’t think of one right now, but if I do, I’ll let you know.
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-22 Thread shout
 isset($_GET['useform']) ? $_GET['useform'] : @$_POST['useform'];
 
 -Peter

obviously a change of perspective helps a lot towards offering a viable 
solution! nicely done. ^^

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-21 Thread Peter Bowers
On Mon, Jan 21, 2013 at 8:37 PM, Oliver Betz list...@gmx.net wrote:

  BTW: Is there a simple way to get something like
  array_merge($_GET, $_POST)[useform];
  in PHP older than 5.4?
  Excuse my ignorance, I'm a plain old C programmer.

Never knock a C programmer!  They're keeping the world rotating on its
axis! :-)

It's a bit boring and C-like, but why not just use a simple ternary
operator?

isset($_GET['useform']) ? $_GET['useform'] : @$_POST['useform'];

-Peter
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-21 Thread Oliver Betz
Peter Bowers pbow...@pobox.com wrote:

Never knock a C programmer!  They're keeping the world rotating on its
axis! :-)

as embedded programmer, I keep things rotating literally g.

It's a bit boring and C-like, but why not just use a simple ternary
operator?

isset($_GET['useform']) ? $_GET['useform'] : @$_POST['useform'];

I don't know why I didn't use the obvious, thanks for the reminder.

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread Oliver Betz
Hello All,

how do you handle structured data?

I want to have personal pages with some structured data, e.g. contact
information and more.

The form to edit the structured data shall be dispayed only on
request.

In the past, I have put the form in the GroupHeader with conditional
markup, e.g.:

  (:if equal {$useform} 'address':) (:pmform adrform:)

where useform is a GET parameter:

  $FmtPV['$useform'] = '$_GET[useform]';

in a local config file.

To display the form, the page is called e.g. with ?useform=address.

But there seems to be no easy way to select the target page depending
on the status:
* post successful - return to the no form page
* post canceled by user - return to the no form page
* post with errors - return to the form

Maybe I'm missign a much simpler solution. Any hints?

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread shout
 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 in PHP older than 5.4?
 Excuse my ignorance, I'm a plain old C programmer.

Is there a reason why you do not use $_REQUEST instead of $_GET/$_POST?


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread Oliver Betz
sh...@joshleepictures.com wrote:

 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 in PHP older than 5.4?
 Excuse my ignorance, I'm a plain old C programmer.

Is there a reason why you do not use $_REQUEST instead of $_GET/$_POST?

$_REQUEST contains also cookie data, doesn't it? I want to avoid
unwanted effects.

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread shout

 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 in PHP older than 5.4?
 Excuse my ignorance, I'm a plain old C programmer.
 
 Is there a reason why you do not use $_REQUEST instead of $_GET/$_POST?
 
 $_REQUEST contains also cookie data, doesn't it? I want to avoid
 unwanted effects.

that’s true. you can eliminate ‘unwanted effects’ by using pseudo-unique 
namespaces in your variable naming, e. g. $_REQUEST['namespaceVarname'].
fyi array_merge() is available in PHP 4 and PHP 5.
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread Oliver Betz
sh...@joshleepictures.com wrote:

 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 in PHP older than 5.4?
 Excuse my ignorance, I'm a plain old C programmer.

[...]

fyi array_merge() is available in PHP 4 and PHP 5.

but the member selection as written above is only available in 5.4, if
I understand correctly. This enables me to avoid a helper function for
$FmtPV.

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm on request, edit structured data on pages

2013-01-20 Thread shout


On 21.01.2013, at 08:05, Oliver Betz list...@gmx.net wrote:
 BTW: Is there a simple way to get something like
 array_merge($_GET, $_POST)[useform];
 in PHP older than 5.4?
 Excuse my ignorance, I'm a plain old C programmer.
 
 [...]
 
 fyi array_merge() is available in PHP 4 and PHP 5.
 
 but the member selection as written above is only available in 5.4, if
 I understand correctly. This enables me to avoid a helper function for
 $FmtPV.

in which scope do you want to use the value at the specific index?

–josh
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PMform

2012-01-24 Thread Jeroen de Vries

Op Mon, 23 Jan 2012 23:45:27 +0100 schreef DaveG pmw...@solidgone.com:




On 1/23/2012 5:09 PM, Jeroen de Vries wrote:

Hello,

I have difficulty installing the PMform on my website. I just was
wandering is this line like seen on the installation manual not missing
something?

$PmForm['reference'] = 'subject=Email from '.$WikiTitle.'
mailto=yourn...@example.com form=#yourform fmt=#yourformpost
from=myn...@myexample.com;

Is there a ' missing? When I'll add this line of code in config.php the
website doesn`t run anymore.
I can't comment on whether the line is correct, but you do need a single  
quote at the end, before the semi-colon:
  $PmForm['reference'] = 'subject=Email from '.$WikiTitle.'  
mailto=yourn...@example.com form=#yourform fmt=#yourformpost  
from=myn...@myexample.com';



  ~ ~ Dave



Thanks Dave

Jeroen


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PMform

2012-01-23 Thread Jeroen de Vries

Hello,

I have difficulty installing the PMform on my website. I just was  
wandering is this line like seen on the installation manual not missing  
something?


$PmForm['reference'] = 'subject=Email from '.$WikiTitle.'  
mailto=yourn...@example.com form=#yourform fmt=#yourformpost  
from=myn...@myexample.com;


Is there a ' missing? When I'll add this line of code in config.php the  
website doesn`t run anymore.



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PMform

2012-01-23 Thread DaveG



On 1/23/2012 5:09 PM, Jeroen de Vries wrote:

Hello,

I have difficulty installing the PMform on my website. I just was
wandering is this line like seen on the installation manual not missing
something?

$PmForm['reference'] = 'subject=Email from '.$WikiTitle.'
mailto=yourn...@example.com form=#yourform fmt=#yourformpost
from=myn...@myexample.com;

Is there a ' missing? When I'll add this line of code in config.php the
website doesn`t run anymore.
I can't comment on whether the line is correct, but you do need a single 
quote at the end, before the semi-colon:
 $PmForm['reference'] = 'subject=Email from '.$WikiTitle.' 
mailto=yourn...@example.com form=#yourform fmt=#yourformpost 
from=myn...@myexample.com';



 ~ ~ Dave

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm - change summary and cancel button

2011-03-06 Thread Randy Brown
Dave,

Thanks for your pointers. The BlogIt recipe was a bit complex for me. I think 
I'm missing a couple of very basic things:

1. My function doesn't seem to be invoked. How does my HandleActions function 
get called? If it's called, will PmForm still do its part, or will I now have 
to update *all* the fields myself? Would I be better off just making a custom 
version of PmForm?

2. My posting template (metapost) only lists the page text variables. Should 
it list the EnteredChangeSummary too? When I tried that, PmForm created a page 
text variable by that name - not what I wanted. How will I pass 
EnteredChangeSummary to the handler?

Thanks,

Randy

P.S. Here is what is now in my config:

$PmForm['savemeta'] = 'saveto={$FullName} form=#metaform fmt=#metapost';

## Allow PmForms to change the page summary
SDV($HandleActions['MetaEdit'], 'HandleMetaEdit'); 
SDV($HandleAuth['MetaEdit'], 'edit');

# 
# - HandleActions Functions
# 
function HandleMetaEdit($pagename, $auth='edit') {  
global $_POST,$ChangeSummary;
   echo HandleMetaEdit: entering function;  # This never appears
if (isset($_REQUEST['cancel'])) {
Redirect($pagename);
}
Lock(2);
if (!PageExists($pagename)) {
Abort(HandleMetaEdit: source page ($pagename) doesn't exist);
}
if ($_POST['target']=='savemeta'  @$_POST['save']) {
 $ChangeSummary = $_POST['EnteredChangeSummary'];
 $old = RetrieveAuthPage($pagename, $auth, TRUE);
 if (!$old) {
Abort(HandleMetaEdit: cannot read source ($pagename));
 } else {
$new = $old;
$new['csum'] = $ChangeSummary;  
# Do I need to handle the other fields, or will PmForm 
continue to do that?
UpdatePage($pagename,$old,$new); 
 }
  }
  Lock(0);
}

In my markup:

[[#metaform]]
**Edit the information about this page**
(:input pmform target=savemeta:)
(:input default source={*$FullName} request=1 :)
(:messages:)
(:table:)
etc.
**Please summarize your changes:** \\
(:input text EnteredChangeSummary size=80:)\\ \\

[[#metapost]]
(:template defaults savevars=$:OnePTV,$:AnotherPTV, etc.  :)
[[#metapostend]]


On Mar 1, 2011, at 7:27 PM, DaveG wrote:

 Check out BlogIt, which uses PmForms, that might help (or might be too 
 complex to easily grab info quickly).


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm - change summary and cancel button

2011-03-06 Thread Hans
Monday, March 7, 2011, 12:06:41 AM, Randy Brown wrote:

 1. My function doesn't seem to be invoked. How does my
 HandleActions function get called? If it's called, will PmForm still
 do its part, or will I now have to update *all* the fields myself?
 Would I be better off just making a custom version of PmForm?

if you use pmform, i.e. (:input pmform :)
it uses its own action=pmform, which calls its own function
HandlePmForm to process the form submission.

It looks as if you want to use your own function,
called with your own action=MetaEdit.

So you need something like this instead of (:input pmform :):

(:input form:) (:input hidden action MetaEdit:)
etc.

Try that and see if your function gets called.

Oh, and $_POST is a 'superglobal' variable, you don't need to
declare it as global in your function, it is available everywhere.

cheers,
  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm - change summary and cancel button

2011-03-01 Thread Randy Brown
I am successfully using a PmForm to change page text variables, but I have two 
problems that I've been unable to solve:

1) Upon save, I want the page's change summary updated too (either 
automatically, or with user-entered information from the form).

2) I would also like a cancel button. (It seems whatever I do, my buttons save 
the data, regardless of their name or value.)

What do I need to do? 

Thanks, 

Randy

-

Here is my config:

$PmForm['savedata'] = 'saveto={$FullName} form=#dataform fmt=#datapost';

Here is my markup:

(:pmform savedata:)

(:if false:)
[[#dataform]]
(:input pmform target=savedata:)
(:input default source={*$FullName} request=1 :)
(:messages:)
(:table:)
(:cellnr:)MyPTV%%:
(:cell:)(:input text $: MyPTV size=70 :)
(:tableend:)
-- (:input submit name=post value=Save :)
(:input end:)
[[#dataformend]]

[[#datapost]]
(:template defaults savevars=$:MyPTV :)
[[#datapostend]]


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm - change summary and cancel button

2011-03-01 Thread DaveG
Check out BlogIt, which uses PmForms, that might help (or might be too 
complex to easily grab info quickly).



On 3/1/2011 4:54 PM, Randy Brown wrote:

I am successfully using a PmForm to change page text variables, but I have two 
problems that I've been unable to solve:

1) Upon save, I want the page's change summary updated too (either 
automatically, or with user-entered information from the form).

Setup some form of event handler. From BlogIt:
SDV($HandleActions['bi_be'], 'bi_HandleEdit'); SDV($HandleAuth['bi_be'], 
'admin');


In your case that might be:
SDV($HandleActions['my_edit'], 'my_HandleEdit'); 
SDV($HandleAuth['my_edit'], 'edit');


in my_HandleEdit() something like (make sure you declare $ChangeSummary, 
$_POST, etc, as global in your function):

  if ($_POST['target']=='savedata'  @$_POST['save']{
$ChangeSummary = $_POST['ptv_MyPTV'];
  }



2) I would also like a cancel button. (It seems whatever I do, my buttons save 
the data, regardless of their name or value.)

Search for 'cancel' in BlogIt for actual use. Basically:
  if ($_POST['cancel']  in_array($_REQUEST['target'],$bi_Forms))

This is checking for the Cancel button being clicked, and then checking 
that the form being submitted is one being managed by PmForms. 
Simplified for your case that might be:

  if ($_POST['cancel']  $_REQUEST['target']=='savedata')


Hope that gets you in a direction to move forward a step.


 ~ ~ Dave

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm documentation disappeared?

2011-02-03 Thread Sandy

On 2/2/2011 11:19 AM, Crisses wrote:

I put up a walkthrough for PmForm on making a very basic website email
form with captcha  honeypot, explaining all the lines  going over all
the steps.

If anyone wants to add ordinal numbers to the steps feel free -- it was
several hours of work, and I'm drained :) lol


Wow! Thanks! I managed to get an email working, but no more than that. 
Now to find an excuse to try another form...


Sandy


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm documentation disappeared?

2011-02-02 Thread Oliver Betz
Crisses wrote:

The PmForm cookbook page still points to where PmForm's full documentation 
used to live, but I'm getting a server error now.

PmForm:Installation
http://www.pmwiki.org/pmform/Installation
PmForm:MailForm
http://www.pmwiki.org/pmform/Installation

while we're at it: PmForm deserves a better documentation. I use it in
one project, but I found it really hard to get it working, and I'm
still not sure whether I did it right.

Oliver


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm documentation disappeared?

2011-02-02 Thread Petko Yotov
On Tuesday 01 February 2011 21:04:20, Crisses wrote :
 The PmForm cookbook page still points to where PmForm's full documentation
 used to live, but I'm getting a server error now.
 
 http://www.pmwiki.org/pmform/Installation

Restored.

Thanks,
Petko

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm documentation disappeared?

2011-02-02 Thread Crisses
I put up a walkthrough for PmForm on making a very basic website email form 
with captcha  honeypot, explaining all the lines  going over all the steps.

If anyone wants to add ordinal numbers to the steps feel free -- it was several 
hours of work, and I'm drained :) lol

http://www.pmwiki.org/pmform/PmForm/BasicEmailForm

Each section has narrative explaining the code, and then wraps up with just 
the code at the end of the section for copy-pasteaholics.

I'll gladly take questions, or requests for further clarification to the extent 
that I understand PmForm, since I've been using it since PM created it.

It's the form that I use for nearly all my client websites.  For example it's 
here:
http://nyses.org/Main/Contact-Us (New York Solar Energy Society -nonprofit-)

Crisses
http://eclectictech.net/wiki/Info/Contact (a modified form is here -my website-)

On Feb 2, 2011, at 4:45 AM, Oliver Betz wrote:

 Crisses wrote:
 
 The PmForm cookbook page still points to where PmForm's full documentation 
 used to live, but I'm getting a server error now.
 
 PmForm:Installation
 http://www.pmwiki.org/pmform/Installation
 PmForm:MailForm
 http://www.pmwiki.org/pmform/Installation
 
 while we're at it: PmForm deserves a better documentation. I use it in
 one project, but I found it really hard to get it working, and I'm
 still not sure whether I did it right.
 
 Oliver
 
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm documentation disappeared?

2011-02-01 Thread Crisses
The PmForm cookbook page still points to where PmForm's full documentation used 
to live, but I'm getting a server error now.

PmForm:Installation
http://www.pmwiki.org/pmform/Installation
PmForm:MailForm
http://www.pmwiki.org/pmform/Installation

referenced here:
http://www.pmwiki.org/wiki/Cookbook/PmForm

500 Internal Server Errors

Crisses

Now I've been crying lately, thinking about the world as it is 
Why must we go on hating, why can't we live in bliss 
Cause out on the edge of darkness, there rides a peace train 
Oh peace train take this country, come take me home again 
 -- Cat Stevens, Peace Train

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform - sender-mail and confirm a mail

2009-09-25 Thread Petko Yotov
On Thursday 24 September 2009 17:02:04 Patrick Ogay Evolution wrote:
 For our chorus I like to create a form so people can reserve places for
 a concert.
 
 I like to improve the functinality here:
 http://www.baselinside.ch/Zeronove/Reservationen
 
 at the moment the sender is:
 www-data www-d...@vps185.sui-inter.net
 can I assign an other sender? (or do I have to change server
 configuration, urgh).

Don't use an input field Email, use from :

 E-Mail: (:input text from size=30:)

This way, the message you receive will appear as sent from the address of the 
visitor. You can press the Reply button in your e-mail software to reply to 
them.

 The other point is that I like to send a confirmation to the user,
 when the form variable {$$Email} is set.
 I'm wondering how I can use this variable from config.php:
 $PmForm['maildemo'] = 'mailto=p...@ddy.ch,{$$Email} ...

You shouldn't : this opens the door to spammers. Instead, you can send the 
user to a successpage on the wiki.

In the mailform template:
  (:input hidden successpage Main.MessageSent:)

Or, in the mailpost template:
  (:template default successpage=Main.MessageSent:)

Thanks,
Petko

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform - sender-mail and confirm a mail

2009-09-24 Thread Patrick Ogay Evolution
For our chorus I like to create a form so people can reserve places for
a concert. 

I like to improve the functinality here: 
http://www.baselinside.ch/Zeronove/Reservationen

at the moment the sender is: 
www-data www-d...@vps185.sui-inter.net  
can I assign an other sender? (or do I have to change server
configuration, urgh).

The other point is that I like to send a confirmation to the user,
when the form variable {$$Email} is set. 
I'm wondering how I can use this variable from config.php: 
$PmForm['maildemo'] = 'mailto=p...@ddy.ch,{$$Email} ...

thanks in advance for any hints.

regards
Patrick 



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform reply-to ? (or senderspecification).

2009-09-24 Thread Patrick Ogay Evolution
in the other post I asked wether the sender my be changed.

A reply-to would also be possibility 
(reply-to or replyto=n...@site.tld didn't work in 
$PmForm['maildemo'] = 'mailto=p...@ddy.ch reply-t...@ddy.ch

regards
Patrick




___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform MailForm doesn't send emails

2009-07-03 Thread Martin Kerz
Solved it myself. MailForm didn't like the brackets in my honeypot  
subject-field.


Martin

Am 02.07.2009 um 21:34 schrieb Martin Kerz:


Hi there,

I have a rather complex Form set up, but unfortunately PmForm/ 
MailForm stopped sending emails. Actually I don't know where to  
debug this problem. Can someone give me a clue?


Here's my form definition in Site/LocalTemplates:

[[#memberform]] (:template defaults  
successpage='Community.Success' :) (:input pmform target={$$target}  
successpage={$$successpage}:) (:input default request=1:)  
(:messages:) ||width='80%' ||!Surname ||(:input text surname  
size=30:) || ||!First name ||(:input text firstname size=30:) || ||! 
Street ||(:input text street size=30:) || ||!ZIP ||(:input text zip  
size=30:) || ||!City ||(:input text city size=30:) || ||!Country || 
(:input text country size=30:) || ||!Phone* ||(:input text phone  
size=30:) || ||!Fax* ||(:input text fax size=30:) || ||!EMail || 
(:input text from size=30:) || ||!Fields of interest ||(:input  
select name=foi1 label=(Chose one) value=none:)(:input select  
name=foi1 value=Personality traits:)(:input select name=foi1  
value=Attitudes  values:)(:input select name=foi1  
value=Intelligence  abilities:)(:input select name=foi1  
value=Self-evaluative dispositions:)(:input select name=foi1  
value=Personality typologies:)(:input select name=foi1  
label= value=none:)\\ (:input select name=foi2  
label=(Chose one) value=none:)(:input select name=foi2  
value=Personality traits:)(:input select name=foi2  
value=Attitudes  values:)(:input select name=foi2  
value=Intelligence  abilities:)(:input select name=foi2  
value=Self-evaluative dispositions:)(:input select name=foi2  
value=Personality typologies:)(:input select name=foi2  
label= value=none:)\\ (:input select name=foi3  
label=(Chose one) value=none:)(:input select name=foi3  
value=Personality traits:)(:input select name=foi3  
value=Attitudes  values:)(:input select name=foi3  
value=Intelligence  abilities:)(:input select name=foi3  
value=Self-evaluative dispositions:)(:input select name=foi3  
value=Personality typologies:)(:input select name=foi3  
label= value=none:)\\ (:input text foi4 size=30:) ||! 
Additional Comments* || || || ||(:input textarea comments rows=6  
size=30:) || %comment% (:input text name=subject value='New  
membership form':) %% %right%(:input submit name=post value='$ 
[Send]':)%% (:input end:) [[#memberformend]] [[#memberpost]]  
(:template require surname errmsg=Please sepcifiy your surname. :)  
(:template require firstname errmsg=Please sepcifiy your  
firstname. :) (:template require street errmsg=Please sepcifiy  
your street. :) (:template require zip errmsg=Please sepcifiy your  
ZIP-Code. :) (:template require city errmsg=Please sepcifiy your  
city. :) (:template require from errmsg=Please sepcifiy your email  
address. :) (:template requires subject match='New memberhip form'  
errmsg='$[Do not fill in honeypot field]':)  **  
Clear Text **  {$$firstname} {$$surname} {$$street}  
{$$zip} {$$city} {$$country} EMail: {$$from} Tel: {$$phone} Fax: {$ 
$fax} Additional Comments: {$$comments} Fields of interest: {$ 
$foi1}, {$$foi2}, {$$foi3}, {$$foi4} * ** SV ** * {$ 
$firstname}{$$surname}{$$street}{$$zip}{$$city}{$$from}{$ 
$phone}{$$fax}{$$comments}{$$foi1}{$$foi2}{$$foi3}{$$foi4}  
== This email was automatically generated from the new  
membership form {$$PageUrl} [[#memberpostend]]



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users




smime.p7s
Description: S/MIME cryptographic signature
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform MailForm doesn't send emails

2009-07-02 Thread Martin Kerz

Hi there,

I have a rather complex Form set up, but unfortunately PmForm/MailForm  
stopped sending emails. Actually I don't know where to debug this  
problem. Can someone give me a clue?


Here's my form definition in Site/LocalTemplates:

[[#memberform]]
(:template defaults successpage='Community.Success' :)
(:input pmform target={$$target} successpage={$$successpage}:)
(:input default request=1:)
(:messages:)
||width='80%'
||!Surname ||(:input text surname size=30:) ||
||!First name ||(:input text firstname size=30:) ||
||!Street ||(:input text street size=30:) ||
||!ZIP ||(:input text zip size=30:) ||
||!City ||(:input text city size=30:) ||
||!Country ||(:input text country size=30:) ||
||!Phone* ||(:input text phone size=30:) ||
||!Fax* ||(:input text fax size=30:) ||
||!EMail ||(:input text from size=30:) ||
||!Fields of interest ||(:input select name=foi1 label=(Chose one)  
value=none:)(:input select name=foi1 value=Personality traits:) 
(:input select name=foi1 value=Attitudes  values:)(:input select  
name=foi1 value=Intelligence  abilities:)(:input select name=foi1  
value=Self-evaluative dispositions:)(:input select name=foi1  
value=Personality typologies:)(:input select name=foi1  
label= value=none:)\\
(:input select name=foi2 label=(Chose one) value=none:)(:input  
select name=foi2 value=Personality traits:)(:input select name=foi2  
value=Attitudes  values:)(:input select name=foi2  
value=Intelligence  abilities:)(:input select name=foi2 value=Self- 
evaluative dispositions:)(:input select name=foi2 value=Personality  
typologies:)(:input select name=foi2 label= value=none:)\\
(:input select name=foi3 label=(Chose one) value=none:)(:input  
select name=foi3 value=Personality traits:)(:input select name=foi3  
value=Attitudes  values:)(:input select name=foi3  
value=Intelligence  abilities:)(:input select name=foi3 value=Self- 
evaluative dispositions:)(:input select name=foi3 value=Personality  
typologies:)(:input select name=foi3 label= value=none:)\\

(:input text foi4 size=30:)
||!Additional Comments* || ||
|| ||(:input textarea comments rows=6 size=30:) ||
%comment% (:input text name=subject value='New membership form':) %%
%right%(:input submit name=post value='$[Send]':)%%
(:input end:)
[[#memberformend]]

[[#memberpost]]
(:template require surname errmsg=Please sepcifiy your surname. :)
(:template require firstname errmsg=Please sepcifiy your firstname. :)
(:template require street errmsg=Please sepcifiy your street. :)
(:template require zip errmsg=Please sepcifiy your ZIP-Code. :)
(:template require city errmsg=Please sepcifiy your city. :)
(:template require from errmsg=Please sepcifiy your email address. :)
(:template requires subject match='New memberhip form' errmsg='$[Do  
not fill in honeypot field]':)


** Clear Text **

{$$firstname} {$$surname}
{$$street}
{$$zip} {$$city}
{$$country}

EMail: {$$from}
Tel: {$$phone}
Fax: {$$fax}

Additional Comments:
{$$comments}

Fields of interest:
{$$foi1}, {$$foi2}, {$$foi3}, {$$foi4}

*
** SV **
*
{$$firstname}{$$surname}{$$street}{$$zip}{$$city}{$$from}{$ 
$phone}{$$fax}{$$comments}{$$foi1}{$$foi2}{$$foi3}{$$foi4}


==
This email was automatically generated from the new membership form
{$$PageUrl}
[[#memberpostend]]




smime.p7s
Description: S/MIME cryptographic signature
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm to create new pages

2009-05-19 Thread Oliver Betz
DaveG wrote:

Oliver Betz wrote:
 $Conditions['exists'] is already defined in pmwiki.php, so your
 suggestion can be simplificated (no php needed):
 
 (:template require if=!exists 'whatever variable' errmsg=The page
 already exists!:)
Good call. If this works, that simplifies BlogIt -- cool.

it works in my environment.

 In Site.ClogIt-CoreTemplate#blog-post-control I use this format:
   (:template defaults saveto={$$ptv_entryurl}:)

 Where entryurl is the name of the PmForm variable in which the user 
 enters the pagename.
 
 Are you using (:input text $:entryurl:), IOW PTV markup for the target
 page?
 
 I'm using (:input text newname:) and therefore get the same result (?)
 by $$something (without ptv_ prefix).
Interesting -- I seem to recall thinking you *had* to use a PTV as the 
form variable, and also wondering *why* I had to use the ptv_ prefix on 

I remember your comment about this in
http://www.pmwiki.org/pmform/PmForm/FmtDirectives

the template. I'll have to see if my use of the PTV has had any 
unintended (possibly useful!) side-affects.

This would be indeed very interesting.

IMO PmForm is a great thing, but it's hard to use because the
documentation tells only very little about the capabilities.

I have seen that you and Mateusz Czaplinski contributed a lot to the
PmForm pages, but the disclaimer (although adequate) could deter
people from using PmForms.

Since PmForm seems to work fine, it's documentation deserves some care
IMO. Sadly I'm not capable doing so - I'm glad if I get it working,
but I know/understand not enough to make a reliable documentation.

Oliver


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm to create new pages

2009-05-19 Thread DaveG


Oliver Betz wrote:
 DaveG wrote:
 
 Oliver Betz wrote:
 $Conditions['exists'] is already defined in pmwiki.php, so your
 suggestion can be simplificated (no php needed):

 (:template require if=!exists 'whatever variable' errmsg=The page
 already exists!:)
 Good call. If this works, that simplifies BlogIt -- cool.
 
 it works in my environment.
Actually, I suspect this wouldn't work in BlogIt's case. Specifically, 
the blog entry can be re-edited, in which case the page will exist (it's 
the page being edited). I needed to do a check specifically for this.

snip
 IMO PmForm is a great thing, but it's hard to use because the
 documentation tells only very little about the capabilities.
 
 I have seen that you and Mateusz Czaplinski contributed a lot to the
 PmForm pages, but the disclaimer (although adequate) could deter
 people from using PmForms.
 
 Since PmForm seems to work fine, it's documentation deserves some care
 IMO. Sadly I'm not capable doing so - I'm glad if I get it working,
 but I know/understand not enough to make a reliable documentation.
Unfortunately, I'm in the same boat, despite using it pretty 
extensively. I'll probably remove some of the open questions though.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm to create new pages

2009-05-18 Thread Oliver Betz
Hi All,

two questions reagarding PmForm as new page tool:

How can I request that the page doesn't yet exist? The :template
require:) markup isn't extensively documented.

Is it the correct method to pass the target page name as variable and
use a line like
 (:template defaults saveto={$$mygroup}.{$$newname} :)
to use it?

TIA,

Oliver


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm to create new pages

2009-05-18 Thread DaveG

Oliver Betz wrote:
 two questions reagarding PmForm as new page tool:
 
 How can I request that the page doesn't yet exist? The :template
 require:) markup isn't extensively documented.
Again, you might want to check how BlogIt handles this :) In summary:
(:template require $:entryurl if=!bi_ispage '{$$ptv_entryurl}' 
errmsg=$[Pagename already exists, or is invalid/blank]:)

And then bi_ispage is a condition which calls a function:
$Conditions['bi_ispage'] = 'bi_IsPage($condparm)';
function bi_IsPage($pn){
$mp = MakePageName($GLOBALS['pagename'], $pn);
if (empty($mp)) return true;
if ($mp==$GLOBALS['pagename']) return false;
return PageExists($mp);
}


 Is it the correct method to pass the target page name as variable and
 use a line like
  (:template defaults saveto={$$mygroup}.{$$newname} :)
 to use it?
In Site.ClogIt-CoreTemplate#blog-post-control I use this format:
   (:template defaults saveto={$$ptv_entryurl}:)

Where entryurl is the name of the PmForm variable in which the user 
enters the pagename.

Hope that helps.

  ~ ~ Dave

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm to create new pages

2009-05-18 Thread Oliver Betz
DaveG wrote:

Oliver Betz wrote:
 two questions reagarding PmForm as new page tool:
 
 How can I request that the page doesn't yet exist? The :template
 require:) markup isn't extensively documented.
Again, you might want to check how BlogIt handles this :) In summary:

you are right, as you write it, I remember where I have been reading
about it...

(:template require $:entryurl if=!bi_ispage '{$$ptv_entryurl}' 
errmsg=$[Pagename already exists, or is invalid/blank]:)

And then bi_ispage is a condition which calls a function:
$Conditions['bi_ispage'] = 'bi_IsPage($condparm)';
function bi_IsPage($pn){
   $mp = MakePageName($GLOBALS['pagename'], $pn);
   if (empty($mp)) return true;
   if ($mp==$GLOBALS['pagename']) return false;
   return PageExists($mp);
}

Thanks for the hint, I didn't know the correct syntax for require.

$Conditions['exists'] is already defined in pmwiki.php, so your
suggestion can be simplificated (no php needed):

(:template require if=!exists 'whatever variable' errmsg=The page
already exists!:)

 Is it the correct method to pass the target page name as variable and
 use a line like
  (:template defaults saveto={$$mygroup}.{$$newname} :)
 to use it?
In Site.ClogIt-CoreTemplate#blog-post-control I use this format:
   (:template defaults saveto={$$ptv_entryurl}:)

Where entryurl is the name of the PmForm variable in which the user 
enters the pagename.

Are you using (:input text $:entryurl:), IOW PTV markup for the target
page?

I'm using (:input text newname:) and therefore get the same result (?)
by $$something (without ptv_ prefix).

Everything seems to work fine now, thanks!

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm MailForm sending to multiple addresses

2009-01-12 Thread Jan Brejcha
Hi,
thanks, I didn't think about this, my intention was to provide the
user with a confirmation, that the form was received and to send her
more information about it. Could I generate a more detailed result
page that would show directly on the page (instead of a mere your
post was successful)?
Thanks,
JB

On Wed, Jan 7, 2009 at 17:12, Neil Herber (nospam) nos...@eton.ca wrote:
 On 2009-01-07 10:32 AM, Jan Brejcha wrote:

 Hi all,

 it would be great if the MailForm could send e-mail also to the
 address filled by the user in the from field. Does anyone know, if
 this is possibile to set up?

 I am not sure this would be so great. Any mailform application that allows
 the user to determine target addresses can be hijacked by spammers.

 If I fill in the FROM with spamsomeb...@example.com and the BODY with an
 offer to share 600 million dollars, I have turned your mailform into an open
 relay of sorts.

 --
 Neil Herber


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm MailForm sending to multiple addresses

2009-01-07 Thread Jan Brejcha
Hi all,

it would be great if the MailForm could send e-mail also to the
address filled by the user in the from field. Does anyone know, if
this is possibile to set up?

Thanks,

JB

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm MailForm sending to multiple addresses

2009-01-07 Thread Hans
Wednesday, January 7, 2009, 3:32:10 PM, Jan Brejcha wrote:

 it would be great if the MailForm could send e-mail also to the
 address filled by the user in the from field. Does anyone know, if
 this is possibile to set up?

it does not do this for security reasons, because it could otherwise
be used as a spamming tool.


  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm MailForm sending to multiple addresses

2009-01-07 Thread Neil Herber (nospam)
On 2009-01-07 10:32 AM, Jan Brejcha wrote:
 Hi all,
 
 it would be great if the MailForm could send e-mail also to the
 address filled by the user in the from field. Does anyone know, if
 this is possibile to set up?

I am not sure this would be so great. Any mailform application that 
allows the user to determine target addresses can be hijacked by spammers.

If I fill in the FROM with spamsomeb...@example.com and the BODY with an 
offer to share 600 million dollars, I have turned your mailform into an 
open relay of sorts.

-- 
Neil Herber

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-31 Thread Simon
Think # 1 would be most helpful.

2008/7/15 Hans [EMAIL PROTECTED]

 Monday, July 14, 2008, 5:00:02 PM, Patrick R. Michaud wrote:

  Note that as I worded #1 and #2 above, even though Site.EditForm
  is preconfigured to display a captcha, the captcha itself won't
  be displayed unless $EnablePostRequiresCaptcha is set.  So, someone
  installing a new site won't see captchas in edit forms at all
  until they set $EnablePostRequiresCaptcha .

 okay. I vote for #1 then.


  ~Hans


 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users




-- 

http://kiwiwiki.co.nz
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-14 Thread Patrick R. Michaud
On Mon, Jul 14, 2008 at 08:35:02AM -0500, Ben Stallings wrote:
 Patrick R. Michaud wrote:
  Weird.  I'm not sure where the problem lies, although it sounds as though
  the captchas are always evaluating as true.
 
 Actually it turns out they were not evaluating at all... I had the same 
 problem many others have had, in that I enabled captchas without adding 
 them to my Site/EditForm, so my attempts to edit pages (including 
 Site/PmFormTemplates) were unsuccessful.  

I see three possible solutions to this:

1.  Make Captcha part of the core, with Site.EditForm preconfigured to
display a captcha whenever $EnablePostRequiresCaptcha is set.

2.  Leave Captcha as a recipe, but modify the distributed Site.EditForm
to display a captcha whenever $EnablePostRequiresCaptcha is set.

3.  Provide a Site.EditForm with the Captcha recipe, and instructions
to tell an admin how to configure it into the system (this actually 
may be the status quo).

Thoughts?

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-14 Thread Hans
Monday, July 14, 2008, 3:28:29 PM, Patrick R. Michaud wrote:

 I see three possible solutions to this:

 1.  Make Captcha part of the core, with Site.EditForm preconfigured to
 display a captcha whenever $EnablePostRequiresCaptcha is set.

 2.  Leave Captcha as a recipe, but modify the distributed Site.EditForm
 to display a captcha whenever $EnablePostRequiresCaptcha is set.

 3.  Provide a Site.EditForm with the Captcha recipe, and instructions
 to tell an admin how to configure it into the system (this actually
 may be the status quo).

I don't like any of these, as I don't see the point in a Captcha on
the edit form. Most wikis I guess trust their editors enough not to
require them to input captcha values. Often the edit access is
restricted by password.

I see a value in a captcha on apage with a form, where submitting is
possible by site visitors.

I recommend to advise admins who want to use the Captcha recipe
to add something like this to config.php, for wikis with edit
access restrictions:


$EnablePostCaptchaRequired = 1;
if (CondAuth($pagename,'edit'))
$EnablePostCaptchaRequired = 0;
include_once('cookbook/captcha.php');





  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-14 Thread Patrick R. Michaud
On Mon, Jul 14, 2008 at 04:05:32PM +0100, Hans wrote:
 Monday, July 14, 2008, 3:28:29 PM, Patrick R. Michaud wrote:
 
  I see three possible solutions to this:
 
  1.  Make Captcha part of the core, with Site.EditForm preconfigured to
  display a captcha whenever $EnablePostRequiresCaptcha is set.
 
  2.  Leave Captcha as a recipe, but modify the distributed Site.EditForm
  to display a captcha whenever $EnablePostRequiresCaptcha is set.
 
  3.  Provide a Site.EditForm with the Captcha recipe, and instructions
  to tell an admin how to configure it into the system (this actually
  may be the status quo).
 
 I don't like any of these, as I don't see the point in a Captcha on
 the edit form. Most wikis I guess trust their editors enough not to
 require them to input captcha values. Often the edit access is
 restricted by password.

Note that as I worded #1 and #2 above, even though Site.EditForm
is preconfigured to display a captcha, the captcha itself won't
be displayed unless $EnablePostRequiresCaptcha is set.  So, someone
installing a new site won't see captchas in edit forms at all 
until they set $EnablePostRequiresCaptcha .

 I recommend to advise admins who want to use the Captcha recipe
 to add something like this to config.php, for wikis with edit
 access restrictions:
 
 $EnablePostCaptchaRequired = 1;
 if (CondAuth($pagename,'edit'))
 $EnablePostCaptchaRequired = 0;
 include_once('cookbook/captcha.php');

Something like this can be done as well, yes.  Easier might
be to modify the captcha recipe to do something like this
directly.  Or, perhaps we could even do it with something like

$DefaultPasswords['edit'] = '@captcha';

to mean that an authenticated captcha is required to edit
the page.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-14 Thread Hans
Monday, July 14, 2008, 5:00:02 PM, Patrick R. Michaud wrote:

 Note that as I worded #1 and #2 above, even though Site.EditForm
 is preconfigured to display a captcha, the captcha itself won't
 be displayed unless $EnablePostRequiresCaptcha is set.  So, someone
 installing a new site won't see captchas in edit forms at all 
 until they set $EnablePostRequiresCaptcha .

okay. I vote for #1 then.


  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform captchas bypassed on thinkhost.com

2008-07-12 Thread Ben Stallings
I'm having a weird problem with PmForm and Captcha on two of my sites 
that are hosted on ThinkHost.com.  The same forms work just fine on 
DreamHost.com, making me think it may be a server configuration issue.

The problem: If you go to 
http://www.worldpopulationbalance.org/ThePopulationIssue/QuestionsAndAnswers 
and submit the form at the bottom of the page, it will send me mail 
regardless of what is typed in the captcha field.

The config.php looks like this:
$EnablePostCaptchaRequired = true;
include_once($FarmD/cookbook/captcha.php);
include_once($FarmD/cookbook/pmform.php);
$PmForm['maileditor'] = '[EMAIL PROTECTED] form=#mailform 
fmt=#mailpost';

Site/PmFormTemplates#mailpost looks like this:
[[#mailpost]]
(:template require from errmsg=$[Missing 'from' address] :)
(:template require subject errmsg=$[Missing message subject] :)
(:template require text errmsg=$[Message text required] :)
(:template require if=captcha errmsg=$[Captcha required] :)
{$$text}
==
Sent via PmForm at {$$PageUrl}
[[#mailpostend]]

Here's another clue: spammers are changing the subject line, so they are 
spoofing the form, not using the one on the page.  Even so, that's the 
sort of thing captchas are supposed to prevent!

And another: even though $EnablePostCaptchaRequired is true, captchas 
are also not required to edit pages (though this is not a problem 
because a password is required!).

Any ideas?  My clients and I are getting tired of being spammed! 
PHPinfo details for the site are at 
http://www.worldpopulationbalance.org/info.php , and I'm running the 
most recent version of PmWiki and the recipes.

Thanks in advance!
Ben Stallings
Interdependent Web

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm updating Description?

2008-03-18 Thread Kathryn Andersen
I've recently started using PmForm to update some of my pages,
ones with lots of page-text-variables. That works fine.
However, I couldn't figure out a way of getting the form
to update the (:description :) content.  Is there a way,
or will I have to use a Description: page text variable instead,
and change all my pagelist definitions?

Kathryn Andersen
-- 
 _--_|\ | Kathryn Andersen  http://www.katspace.com
/  \| 
\_.--.*/| GenFicCrit mailing list http://www.katspace.com/gen_fic_crit/
  v | 
| Melbourne - Victoria - Australia - Southern Hemisphere
Maranatha!  |   - Earth - Sol - Milky Way Galaxy - Universe

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users



Re: [pmwiki-users] PmForm: MailForm - clicky things

2008-01-10 Thread Steve Glover
On Tue, 2008-01-08 at 18:48 +, Steve Glover wrote:

 Has anyone used PmForm's MailForm with either checkboxes or radio
 buttons, please?

Answering my own question - it's 'orribly kludgy, but this seems to
work:

!! #mailform2

This form is displayed when [EMAIL PROTECTED]@] is displayed by a pmform
target.

[@
[[#mailform2]]
(:template default successpage='' :)
(:input pmform target={$$target} successpage={$$successpage} :)
(:input default request=1:)
(:messages:)
(:input hidden choice1 value='No' :)
(:input hidden choice2 value='No' :)
(:input hidden choice3 value='No' :)
(:input hidden subject value='Event Choice' :)
||width='' 
||$[Your name]: ||(:input text name size=30:) ||
||$[Your email address]: ||(:input text from size=30:) ||
||$[Attending camp one]: ||(:input checkbox choice1 value='Yes' :) ||
||$[Attending camp two]: ||(:input checkbox choice2 value='Yes' :) ||
||$[Attending camp three]: ||(:input checkbox choice3 value='Yes' :) ||
{$Captcha} (:input captcha:) \\
(:input submit name=post value='$[Send]':)
(:input end:)
[[#mailform2end]]
@]

!! #mailpost2

This specifies the message to be sent when [EMAIL PROTECTED]@] is given
by a pmform target.  It verifies the existence of a name, email address
and captcha.

[@
[[#mailpost2]]
(:template require from errmsg=$[Missing email address] :)
(:template require name errmsg=$[Missing name] :)
(:template require if=captcha errmsg=$[Captcha required] :)

Attending event one: {$$choice1} 
Attending event two: {$$choice2}
Attending event three: {$$choice3}

==
Sent via PmForm at {$$PageUrl}
[[#mailpostend2]] 
@]

Hoping this may be helpful to some

Steve

-- 
Steve Glover at  email: [EMAIL PROTECTED]
SDSS, EDINA, University of Edinburgh,  tel: +44 (0)131-650 2908
Causewayside House, 160 Causewayside,  fax: +44 (0)131-650 3308
Edinburgh EH9 1PR  mobile: +44 (0) 7961 446 902


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm: MailForm - clicky things

2008-01-08 Thread Steve Glover
Hi,

Has anyone used PmForm's MailForm with either checkboxes or radio
buttons, please?

(I've had a request for an event sign-up form that this would be useful
for)

Thanks,

Steve

-- 
Steve Glover at  email: [EMAIL PROTECTED]
SDSS, EDINA, University of Edinburgh,  tel: +44 (0)131-650 2908
Causewayside House, 160 Causewayside,  fax: +44 (0)131-650 3308
Edinburgh EH9 1PR  mobile: +44 (0) 7961 446 902


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmForm: what does the where= option and where to place ?

2008-01-02 Thread Knut Alboldt
Hi !

What's the where-option doing ? Ok, it places something somewhere, but 
what ?
- new fields on an existing page ?
- when is it useable (when using saveto= or mailto= ?)
And in which markup is it used ?

Knut

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm won't save data to page

2007-12-31 Thread Knut Alboldt
I've played arrount a bit with PmForm and built a new Form up from 
scratch, now saving works.

I'm missing a bit of error-reporting, when definitions are not found by 
PmForm, so I added some abort()-Statements. I'll will publish them, when 
testing is done, hoping it will help others when starting with pmform.

Knut

Knut Alboldt schrieb:
 Hi !
 I tried to use pmform (instead of ZAP) to support form-input for some 
 datapages.
 Tried the samples, worked well.
 Extended some of the definition, now I get the problem, that the data 
 aren't written back any more.
 
 Implemented a trace in pmform.php and found out that the call of 
 UpdatePage($pagename,$old,$new) was ok, $old contained the right old 
 data (eg var=1), $new the new data (e.g. var=2 entered via the form). 
 But having a look in tha page's file: nothing had changed, stil 
 containing var=1. So it wasn't read by the (:input source= ..:)-markup 
 when the form was displayed the nex time.
 Second try:
 Changed var from 1 to 3
 The next Trace of UpdatePage() shows the previous entered data (var=2) 
 in the $old-Array although it wasn't saved in the page-file (!) and the 
 last entered data (var=3) in the $new-array.
 But again the page's file still contains var=1.
 Has it something to do with caching, etc ?
 
 When I change the data in the page-file manually, the changed value is 
 taken over whith the next display of the form, that's all ok.
 
 Could anybody please help ?
 
 Thanks in advance, Knut
 
 
 
 The pmform-Definitions are as follows:
 
 
 
 test.php (group's config):
 
 ?php
 $PmForm['testsavedata'] = 'form=#testsavedataform fmt=#testsavedata';
 ?
 
 
 
 
 Form-Definitions in Site.PmFormTemplates
 
 !! #testdataform
 
 [@
 [[#testsavedataform]]
 (:input pmform target={$$target} :)
 (:XXinput default request=1 :)
 (:messages:)
 (:input default source={$FullName} :)
 (:table:)
 (:cellnr:)Selectfield:
 (:cell:)
 (:input select $:Selectfield value='Option 1' :)
 (:input select $:Selectfield value='Option 2' :)
 (:input select S:Selectfield value='Option 3' :)
 (:input select S:Selectfield value='Option 4' :)
 (:cellnr:)Textfield:
 (:cell:)
 (:input text $:Textfield size=25 :)
 (:cellnr:)Radiofield:
 (:cell:)
 (:input radio $:Radiofield yes:) Yes
 (:input radio $:Radiofield no:) No
 (:cellnr:)Checkboxfields:
 (:cell:)
 (:input checkbox $:CheckboxfieldRed 1:) Red
 (:input checkbox $:CheckboxfieldBlue 1:) Blue
 (:input checkbox $:CheckboxfieldGreen 1:) Green
 (:cellnr:)Textareafield:
 (:cell:)
 (:input textarea $:Textareafield cols=50 rows=6 :)
 (:cellnr:)
 (:cell:)(:input submit :)
 (:tableend:)
 (:input end:)
 
 Text outside the input form
 * Data-Source={$FullName}
 * Selectfield={$:Selectfield}
 * CheckboxfieldRed={$:CheckboxfieldRed}
 [[#testsavedataformend]]
 @]
 
 [@
 [[#testsavedata]]
 (:template require $:Selectfield errmsg=$[Missing 'Selectfield' value] :)
 (:template require $:Textfield errmsg=$[Missing 'textfield' value] :)
 (:template require $:Radiofield errmsg=$[Missing 'Radiofield' value] :)
 (:template require $:Textareafield errmsg=$[Missing 'Textareafield' 
 value] :)
 (:template defaults 
 savevars=$:Selectfield,$:Textfield,$:Radiofield,$:CheckboxfieldRed,$:CheckboxfieldBlue,$:CheckboxfieldGreen,$:Textareafield
  
 :)
 (:template defaults saveto={*$FullName} :)
 [[#testsavedataend]]
 @]
 
 
 
 Test.GroupHeader:
 
 (:if name Test.PmForm*:)
 ! PMForm-Call
 (:pmform testsavedata:)
 || border=0
 
 ! Test Data Output (for Trace only !)
 * Selectfield: {$:Selectfield}
 * Textfield: {$:Textfield}
 * Radiofield: {$:Radiofield}
 * Checkboxfields: Red={$:CheckboxfieldRed} Green={$:CheckboxfieldGreen} 
 Blue={$:CheckboxfieldBlue}
 * Textareafield: {$:Textareafield}
 (:if:)
 
 
 
 
 Page containg Testdata = test.PmForm01
 
 ! saved data
 (:Selectfield:Option 3:)
 (:Textareafield:Textareavalue Line 22
 # Line 2
 # Line 3
 * Line 4
 ** Line 55:)
 (:Radiofield:yes:)
 (:Textfield:Textfieldvalue 33:)
 (:CheckboxfieldRed: 1:)
 (:CheckboxfieldBlue: :)
 (:CheckboxfieldGreen: :)
 
 !! Additional Data
 * Additional data: {$:AdditionalField}
 
 (:AdditionalField:Value Additional Field:)
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users
 
 

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm HTML-Generation

2007-12-30 Thread Knut Alboldt
I've got another Problem with pmform:

I'm using lines like:

!Hardware:

in my pages. Without PmForm, all is rendered well:

h1
Hardware:/h1p


With PmForm aktivated, it will be rendered into:

h1
div class='property-Hardware'Hardware:/h1p/div

which is not quite right HTML (the h1 is closed before the enclosed div).

It seems to be, that PmForm assumes !Hardware: as a PTV not regarding 
the leading ! in the following code:

Markup('ptv:', 'block',
   '/^(\\w[-\\w]+)\\s*:.*$/',
   :block,0div class='property-$1'$0/div);

when I remove this Markup-definition, all is rendered well.
Does this code do anything else but assigning a css-class to a PVT (I'm 
not sure, what the :block,0 tag does ?

Knut

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm won't save data to page

2007-12-29 Thread Knut Alboldt
Hi !
I tried to use pmform (instead of ZAP) to support form-input for some 
datapages.
Tried the samples, worked well.
Extended some of the definition, now I get the problem, that the data 
aren't written back any more.

Implemented a trace in pmform.php and found out that the call of 
UpdatePage($pagename,$old,$new) was ok, $old contained the right old 
data (eg var=1), $new the new data (e.g. var=2 entered via the form). 
But having a look in tha page's file: nothing had changed, stil 
containing var=1. So it wasn't read by the (:input source= ..:)-markup 
when the form was displayed the nex time.
Second try:
Changed var from 1 to 3
The next Trace of UpdatePage() shows the previous entered data (var=2) 
in the $old-Array although it wasn't saved in the page-file (!) and the 
last entered data (var=3) in the $new-array.
But again the page's file still contains var=1.
Has it something to do with caching, etc ?

When I change the data in the page-file manually, the changed value is 
taken over whith the next display of the form, that's all ok.

Could anybody please help ?

Thanks in advance, Knut



The pmform-Definitions are as follows:



test.php (group's config):

?php
$PmForm['testsavedata'] = 'form=#testsavedataform fmt=#testsavedata';
?




Form-Definitions in Site.PmFormTemplates

!! #testdataform

[@
[[#testsavedataform]]
(:input pmform target={$$target} :)
(:XXinput default request=1 :)
(:messages:)
(:input default source={$FullName} :)
(:table:)
(:cellnr:)Selectfield:
(:cell:)
(:input select $:Selectfield value='Option 1' :)
(:input select $:Selectfield value='Option 2' :)
(:input select S:Selectfield value='Option 3' :)
(:input select S:Selectfield value='Option 4' :)
(:cellnr:)Textfield:
(:cell:)
(:input text $:Textfield size=25 :)
(:cellnr:)Radiofield:
(:cell:)
(:input radio $:Radiofield yes:) Yes
(:input radio $:Radiofield no:) No
(:cellnr:)Checkboxfields:
(:cell:)
(:input checkbox $:CheckboxfieldRed 1:) Red
(:input checkbox $:CheckboxfieldBlue 1:) Blue
(:input checkbox $:CheckboxfieldGreen 1:) Green
(:cellnr:)Textareafield:
(:cell:)
(:input textarea $:Textareafield cols=50 rows=6 :)
(:cellnr:)
(:cell:)(:input submit :)
(:tableend:)
(:input end:)

Text outside the input form
* Data-Source={$FullName}
* Selectfield={$:Selectfield}
* CheckboxfieldRed={$:CheckboxfieldRed}
[[#testsavedataformend]]
@]

[@
[[#testsavedata]]
(:template require $:Selectfield errmsg=$[Missing 'Selectfield' value] :)
(:template require $:Textfield errmsg=$[Missing 'textfield' value] :)
(:template require $:Radiofield errmsg=$[Missing 'Radiofield' value] :)
(:template require $:Textareafield errmsg=$[Missing 'Textareafield' 
value] :)
(:template defaults 
savevars=$:Selectfield,$:Textfield,$:Radiofield,$:CheckboxfieldRed,$:CheckboxfieldBlue,$:CheckboxfieldGreen,$:Textareafield
 
:)
(:template defaults saveto={*$FullName} :)
[[#testsavedataend]]
@]



Test.GroupHeader:

(:if name Test.PmForm*:)
! PMForm-Call
(:pmform testsavedata:)
|| border=0

! Test Data Output (for Trace only !)
* Selectfield: {$:Selectfield}
* Textfield: {$:Textfield}
* Radiofield: {$:Radiofield}
* Checkboxfields: Red={$:CheckboxfieldRed} Green={$:CheckboxfieldGreen} 
Blue={$:CheckboxfieldBlue}
* Textareafield: {$:Textareafield}
(:if:)




Page containg Testdata = test.PmForm01

! saved data
(:Selectfield:Option 3:)
(:Textareafield:Textareavalue Line 22
# Line 2
# Line 3
* Line 4
** Line 55:)
(:Radiofield:yes:)
(:Textfield:Textfieldvalue 33:)
(:CheckboxfieldRed: 1:)
(:CheckboxfieldBlue: :)
(:CheckboxfieldGreen: :)

!! Additional Data
* Additional data: {$:AdditionalField}

(:AdditionalField:Value Additional Field:)

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm DataForm with input select

2007-09-18 Thread Mateusz Czaplinski
On 9/15/07, Pico Ben-Amotz [EMAIL PROTECTED] wrote:
 On 9/15/07, Ben Stallings [EMAIL PROTECTED] wrote:
  If you don't want to navigate to the page, try changing the name of the
  input to something other than n.  Best of luck!  --Ben
 
 That works.  Thank you.  I added a note to the documentation at
 PmWiki/Forms.  I'd like to understand this better, is it part of the
 standard html input , or the DOM select?  Are there other reserved
 names that determine the resulting actions.

The 'n' argument is used by PmWiki so that it can be informed which
page you want to see. In a standard out-of-the-box PmWiki
installation, when you want to see page, say, PmWiki.PageLists, you
navigate your browser to:
  http://example.com/pmwiki.php?n=PmWiki.PageLists
- note the 'n=' part here! PmWiki engine (and many other internet
scripts as well) often choose not to recognize whether some variable
input comes from a html form or from the URL (those two methods of
input are called POST and GET methods). Therefore passing some value
assigned to 'n' variable to PmWiki, whichever the method, instructs
the wiki script to load and display specified page.

Similar magic variables you can use/avoid can be for example:
- action - chooses whether a page should be viewed ('browse'), edited
(edit), history shown (diff), attributes changed (attr), you want to
encrypt some password (crypt), you want to log in (login), you want to
search for some page (search), have I forgot something? :)
- q - when used with action=search, specifies the query (e.g. words) to search.
And there may be some others, yes. :) Especially some Cookbook recipes
can add new ones.

 Now that I've got it working there is one more thing I'd like to try
 to figure out: is there a way to cause the saved page text variables
 to be appended, rather than overwritten, as new values are selected on
 subsequent posts, so that the first post saves Value1 and the second
 post saves Value1 Value2, etc.

 Here is what I have in my template:

 [[#dataform]]
 (:input pmform target=savedata :)
 (:input default source={*$FullName} :)
 (:input default request=1 :)
 || People:||(:pagelist fmt=#ddpeople group=people:) ||
 || Places:||(:pagelist fmt=#ddplaces group=places:)||
 (:input submit :)
 (:input end:)
 [[#dataformend]]

 [[#datapost]]
 (:template defaults where=below savevars=$:people,$:places:)
 [[#datapostend]]

 [[#ddpeople]]
 (:input select $:people [[{=$FullName}|{=$Name}]] {=$Titlespaced}:)
 [[#ddpeopleend]]

 [[#ddplaces]]
 (:input select $:places [[{=$FullName}|{=$Name}]] {=$Titlespaced}:)
 [[#ddplacesend]]

If I understand you correctly, try to get a look at the Comments
example in PmForms. It appends some text to the end of the page with
every Submit-button-press. The difference there is that the names used
for form fields don't have the '$:' at the beginning and there's no
'savevars'. Instead, the part corresponding to #datapost in your
example uses {$$field-name} to retrieve the values, and the section
between [[#datapost]] and [[#datapostend]] should be a template which
will be appended to the page on each submission.

'savevars' replaces text in the target page (while {$$variables} in a
template are appended) and saves them in special format called
PageTextVariables. It has some advantages and special uses, and AFAIK
there can be only one page variable with a certain name on a page (and
it can have only one value).

Hope that helps :)
Mateusz Czaplinski

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm DataForm with input select

2007-09-15 Thread Ben Stallings
Pico Ben-Amotz wrote:
 [[#dropdownlist]]
 (:input select name=n {=$FullName} {=$Name}:)
 [[#dropdownlistend]]
 
 which provided me with a drop down list, but when I pressed select I would
 navigate to the page selected in the drop down list instead of simply
 passing along the value from the drop down list.
 
 What am I missing?

If you don't want to navigate to the page, try changing the name of the 
input to something other than n.  Best of luck!  --Ben

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm DataForm with input select

2007-09-15 Thread Pico Ben-Amotz
On 9/15/07, Ben Stallings [EMAIL PROTECTED] wrote:
 Pico Ben-Amotz wrote:
  [[#dropdownlist]]
  (:input select name=n {=$FullName} {=$Name}:)
  [[#dropdownlistend]]
 
  which provided me with a drop down list, but when I pressed select I would
  navigate to the page selected in the drop down list instead of simply
  passing along the value from the drop down list.
 
  What am I missing?

 If you don't want to navigate to the page, try changing the name of the
 input to something other than n.  Best of luck!  --Ben

That works.  Thank you.  I added a note to the documentation at
PmWiki/Forms.  I'd like to understand this better, is it part of the
standard html input , or the DOM select?  Are there other reserved
names that determine the resulting actions.

Now that I've got it working there is one more thing I'd like to try
to figure out: is there a way to cause the saved page text variables
to be appended, rather than overwritten, as new values are selected on
subsequent posts, so that the first post saves Value1 and the second
post saves Value1 Value2, etc.

Here is what I have in my template:

[[#dataform]]
(:input pmform target=savedata :)
(:input default source={*$FullName} :)
(:input default request=1 :)
|| People:||(:pagelist fmt=#ddpeople group=people:) ||
|| Places:||(:pagelist fmt=#ddplaces group=places:)||
(:input submit :)
(:input end:)
[[#dataformend]]

[[#datapost]]
(:template defaults where=below savevars=$:people,$:places:)
[[#datapostend]]

[[#ddpeople]]
(:input select $:people [[{=$FullName}|{=$Name}]] {=$Titlespaced}:)
[[#ddpeopleend]]

[[#ddplaces]]
(:input select $:places [[{=$FullName}|{=$Name}]] {=$Titlespaced}:)
[[#ddplacesend]]

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm DataForm with input select

2007-09-14 Thread Pico Ben-Amotz
I'm trying to use PmForm DataForm with input select to use a drop down list
generated from a pagelist to populate a data form variable.
I started with the basic DataForm example (which worked fine) but I am
having a hard time figuring out how to modify it to switch from a regular
input text to an input select.  Here is what I am starting out with.

In Site/LocalTemplates I have the following dataform, datapost and dropdown
templates:



[[#dataform]]
(:input pmform target=savedata :)
(:input default source={*$FullName} :)
(:input default request=1 :)
(:messages:)
|| Name:||(:input text $:name size=25 :) ||
|| Email:||(:input text $:email size=25 :) ||
(:input submit :)
(:input end:)
[[#dataformend]]


[[#datapost]]

(:template defaults savevars=$:name,$:email, $:n:)
[[#datapostend]]


[[#dropdownlist]]
(:input select name=n {=$FullName} {=$Name}:)
[[#dropdownlistend]]

Initially I tried changing the dataform message line for name to:


|| Name:||(:pagelist fmt=#dropdownlist group=people ||


which provided me with a drop down list, but when I pressed select I would

navigate to the page selected in the drop down list instead of simply

passing along the value from the drop down list.


What am I missing?


Pico
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] pmform input filtering

2007-09-13 Thread blues

is there a way to filter input from a pmform form?
what i want to do is avoid users to input some markup
and especially directives from inside a comment box.

blues


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform input filtering

2007-09-13 Thread Patrick R. Michaud
On Thu, Sep 13, 2007 at 01:04:40PM +0300, blues wrote:
 
 is there a way to filter input from a pmform form?
 what i want to do is avoid users to input some markup
 and especially directives from inside a comment box.

PmForm already blocks directives from data being saved to
pages by converting markups: thus (: becomes ( :
and :) becomes : ).  These are managed by the 
$PmFormPostPatterns array.

The (:template require:) directive can be used to
prevent certain string combinations from appearing in
posted fields.  For example, to prevent someone from
entering link markups, use:

(:template require text match=-[[ errmsg=links not allowed:)

which says that the 'text' field must not contain [[.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] pmform input filtering

2007-09-13 Thread blues
On Thu, 13 Sep 2007 16:02:50 +0300, Patrick R. Michaud  
[EMAIL PROTECTED] wrote:

 On Thu, Sep 13, 2007 at 01:04:40PM +0300, blues wrote:

 is there a way to filter input from a pmform form?
 what i want to do is avoid users to input some markup
 and especially directives from inside a comment box.

 PmForm already blocks directives from data being saved to
 pages by converting markups: thus (: becomes ( :
 and :) becomes : ).  These are managed by the
 $PmFormPostPatterns array.

 The (:template require:) directive can be used to
 prevent certain string combinations from appearing in
 posted fields.  For example, to prevent someone from
 entering link markups, use:

 (:template require text match=-[[ errmsg=links not allowed:)

 which says that the 'text' field must not contain [[.


thanks for the explanation, i'll give a look to how
the $PmFormPostPatterns works.
also the (:template require:) looks very powerful.

blues



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm + GroupAttributes password set = no write without pw

2007-09-03 Thread Thomas -Balu- Walter
Hey all,

I have a group that is edit protected using the edit password on it's
GroupAttributes page. This way PmForm asks for an edit password if it
tries to save to a page in this group.

Is there any way to avoid that and make PmForm save the page without
asking for a password?

Since I specify where to save in the local config anyway (and no one can
save somewhere else) I think it should be safe that way, or not?

 Balu

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-14 Thread blues
On Wed, 13 Jun 2007 17:14:13 +0300, Patrick R. Michaud  
[EMAIL PROTECTED] wrote:
 On Wed, Jun 13, 2007 at 04:26:04PM +0300, blues wrote:
 On Wed, 13 Jun 2007 13:06:04 +0300, Patrick R. Michaud
 [EMAIL PROTECTED] wrote:
  Always sending from a fixed address can be done a variety of ways...
  the easiest is to set the 'from' field in the configuration:
 
$PmForm['mailform'] =
  '[EMAIL PROTECTED] [EMAIL PROTECTED]
   form=#mailform fmt=#mailpost';

 going out from the thread, i wanted to ask a side-question.
 is it possible to specify the configuration (form=, fmt= etc.)
 directly on the (:pmform:) markup? ala pagelist, somehow.
 that way it would be easier to configure, without messing
 with the php scripts.

 One can specify the form= paramter within the (:pmform:) markup,
 but specifying fmt= or mailto= within (:pmform:) is generally
 disallowed as a potential security risk, as it would allow
 authors to send mail to arbitrary places or post data.

in the case of the mailform, yes, but that is not the only thing
pmform can do.

 Eventually there will be a SiteAdmin.PmFormConfig page where an
 administrator can specify the configuration without needing the
 php scripts.  And I may provide an option to relax the restriction
 on (:pmform:) for sites that aren't concerned about security
 issues.  But the default will generally be that certain parameters
 can only be specified in the configuration itself.

the SiteAdmin.PmFormConfig page solution is very nice, i think. :)
keep up the great work.

blues


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-14 Thread Roman
On 6/13/07, Roman [EMAIL PROTECTED] wrote:
 1. When I hit Preview on a page with mailform, e-mail text (textarea)
 is pre-loaded by page source text. You can reproduce it at
 http://www.pmwiki.org/pmform/PmForm/MailForm. It's not a big problem
 but it's confusing.

I've found that this is caused by same name of mailform textarea and
edit action textarea. Unique name solves the problem.

Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-14 Thread Roman
I've tested everything on my working server and everything works fine.
Then I've moved to live server and PmForm does not send any e-mail -
no error message in (:message:) position and filled data are kept in
form fields. I've checked that sending e-mail by PHP mail() function
works - it is used in another recipe that I want to replace by PmForm.
What else could be wrong? The only difference I am aware of is that
working server is running PHP 4.4 while live one is running PHP 5.2.

Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-14 Thread Roman
On 6/14/07, Roman [EMAIL PROTECTED] wrote:
 I've tested everything on my working server and everything works fine.
 Then I've moved to live server and PmForm does not send any e-mail -
 no error message in (:message:) position and filled data are kept in
 form fields. I've checked that sending e-mail by PHP mail() function
 works - it is used in another recipe that I want to replace by PmForm.
 What else could be wrong? The only difference I am aware of is that
 working server is running PHP 4.4 while live one is running PHP 5.2.

I found it. On live server I limit available actions, so I added
pmform action to the list

$Actions_allowed = array('browse','search','rss','download','pmform');
if (! in_array($action, $Actions_allowed)) { $action='browse'; }

Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-13 Thread Patrick R. Michaud
On Tue, Jun 12, 2007 at 04:49:20PM +0200, Roman wrote:
 I've created my first mailform and I would like to ask if the
 following is possible.
 
 1. Is it possible to setup mailform where e-mail address would be
 optional? If user does not enter e-mail address then some fixed from
 adrress (e.g. [EMAIL PROTECTED]) would be used instead. 

Perhaps pre-load the From: field with an address?

(:input text name=from value='[EMAIL PROTECTED]' :)

I probably need to come up with a use this value if field empty
option, or make it the default.

 Or, if it is
 easier, e-mail would be always sent from fixed address, and optional
 user e-mail would be part of e-mail text.

Always sending from a fixed address can be done a variety of ways...
the easiest is to set the 'from' field in the configuration:

  $PmForm['mailform'] =
'[EMAIL PROTECTED] [EMAIL PROTECTED] 
 form=#mailform fmt=#mailpost';

 2. Is it possible to setup mailform that would use fixed subject (e.g.
 Site Feedback or Feedback from {$$PageUrl})?

Yes -- again, just set the parameter in the configuration:

  $PmForm['mailform'] =
'[EMAIL PROTECTED] [EMAIL PROTECTED] 
 subject=Site Feedback
 form=#mailform fmt=#mailpost';

Any fields set in the configuration override values coming
from a post.
 
 And finally one problem:
 
 When I enter multiline text with EOL characters, I always get error
 message Message text required. Single line text is sent
 successfully.

Now fixed as of PmForm version 2007-06-12.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-13 Thread Roman
On 6/13/07, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 On Tue, Jun 12, 2007 at 04:49:20PM +0200, Roman wrote:
  I've created my first mailform and I would like to ask if the
  following is possible.
 
  1. Is it possible to setup mailform where e-mail address would be
  optional? If user does not enter e-mail address then some fixed from
  adrress (e.g. [EMAIL PROTECTED]) would be used instead.

 Perhaps pre-load the From: field with an address?

 (:input text name=from value='[EMAIL PROTECTED]' :)

 I probably need to come up with a use this value if field empty
 option, or make it the default.

  Or, if it is
  easier, e-mail would be always sent from fixed address, and optional
  user e-mail would be part of e-mail text.

 Always sending from a fixed address can be done a variety of ways...
 the easiest is to set the 'from' field in the configuration:

   $PmForm['mailform'] =
 '[EMAIL PROTECTED] [EMAIL PROTECTED]
  form=#mailform fmt=#mailpost';

Ah, that was easy. Now I better understand how PmForm configuration
works. I prefer hidden from address so I chose second solution.

Two more comments:

1. When I hit Preview on a page with mailform, e-mail text (textarea)
is pre-loaded by page source text. You can reproduce it at
http://www.pmwiki.org/pmform/PmForm/MailForm. It's not a big problem
but it's confusing.

2. (:messages:) directive is part of mailform template. When someting
goes wrong one could easily overlook error messages, especially on
long pages where mailform is at the bottom. So I deleted (:messages:)
from template and put it at the beginning of every page where mailform
is used. My question is: Can I put (:messages:) to AllGroupHeader? Can
it cause any problem on pages where (:messages:) have no use? Or,
could PmWiki show such messages at the top of page by default, i.e.
without the need to explictly use (:messages:) directive?

Thank you
Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-13 Thread blues
On Wed, 13 Jun 2007 13:06:04 +0300, Patrick R. Michaud  
[EMAIL PROTECTED] wrote:
 Always sending from a fixed address can be done a variety of ways...
 the easiest is to set the 'from' field in the configuration:

   $PmForm['mailform'] =
 '[EMAIL PROTECTED] [EMAIL PROTECTED]
  form=#mailform fmt=#mailpost';

going out from the thread, i wanted to ask a side-question.
is it possible to specify the configuration (form=, fmt= etc.)
directly on the (:pmform:) markup? ala pagelist, somehow.
that way it would be easier to configure, without messing
with the php scripts.

blues


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-13 Thread Patrick R. Michaud
On Wed, Jun 13, 2007 at 04:26:04PM +0300, blues wrote:
 On Wed, 13 Jun 2007 13:06:04 +0300, Patrick R. Michaud  
 [EMAIL PROTECTED] wrote:
  Always sending from a fixed address can be done a variety of ways...
  the easiest is to set the 'from' field in the configuration:
 
$PmForm['mailform'] =
  '[EMAIL PROTECTED] [EMAIL PROTECTED]
   form=#mailform fmt=#mailpost';
 
 going out from the thread, i wanted to ask a side-question.
 is it possible to specify the configuration (form=, fmt= etc.)
 directly on the (:pmform:) markup? ala pagelist, somehow.
 that way it would be easier to configure, without messing
 with the php scripts.

One can specify the form= paramter within the (:pmform:) markup, 
but specifying fmt= or mailto= within (:pmform:) is generally 
disallowed as a potential security risk, as it would allow 
authors to send mail to arbitrary places or post data.

Eventually there will be a SiteAdmin.PmFormConfig page where an
administrator can specify the configuration without needing the
php scripts.  And I may provide an option to relax the restriction
on (:pmform:) for sites that aren't concerned about security
issues.  But the default will generally be that certain parameters
can only be specified in the configuration itself.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-13 Thread carlos . ab
Em Quarta 13 Junho 2007 11:14, Patrick R. Michaud escreveu:
 On Wed, Jun 13, 2007 at 04:26:04PM +0300, blues wrote:
  On Wed, 13 Jun 2007 13:06:04 +0300, Patrick R. Michaud
 
  [EMAIL PROTECTED] wrote:
   Always sending from a fixed address can be done a variety of ways...
   the easiest is to set the 'from' field in the configuration:
  
 $PmForm['mailform'] =
   '[EMAIL PROTECTED] [EMAIL PROTECTED]
form=#mailform fmt=#mailpost';
 
  going out from the thread, i wanted to ask a side-question.
  is it possible to specify the configuration (form=, fmt= etc.)
  directly on the (:pmform:) markup? ala pagelist, somehow.
  that way it would be easier to configure, without messing
  with the php scripts.

 One can specify the form= paramter within the (:pmform:) markup,
 but specifying fmt= or mailto= within (:pmform:) is generally
 disallowed as a potential security risk, as it would allow
 authors to send mail to arbitrary places or post data.

 Eventually there will be a SiteAdmin.PmFormConfig page where an
 administrator can specify the configuration without needing the
 php scripts.  And I may provide an option to relax the restriction
 on (:pmform:) for sites that aren't concerned about security
 issues.  But the default will generally be that certain parameters
 can only be specified in the configuration itself.

 Pm

Another (far on the) side question.

Is it possible to set an e-mail address inside a profile page as a invisible 
page text variable and have pmform to fetch the e-mail address from a profile 
page and then send the message to that e-mail address?

Perhaps using something like this:

(:pmform from=Profiles.CarlosAB :) or just
(:pmform from=CarlosAB :) 

I guess it isn't as it don't generate a page like Site/(All)MailSent or 
something like that.

TIA,

CarlosAB




___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm (Mailform) questions

2007-06-12 Thread Roman
I've created my first mailform and I would like to ask if the
following is possible.

1. Is it possible to setup mailform where e-mail address would be
optional? If user does not enter e-mail address then some fixed from
adrress (e.g. [EMAIL PROTECTED]) would be used instead. Or, if it is
easier, e-mail would be always sent from fixed address, and optional
user e-mail would be part of e-mail text.

2. Is it possible to setup mailform that would use fixed subject (e.g.
Site Feedback or Feedback from {$$PageUrl})?

And finally one problem:

When I enter multiline text with EOL characters, I always get error
message Message text required. Single line text is sent
successfully.

thank you in advance

Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm (Mailform) questions

2007-06-12 Thread Roman
On 6/12/07, Roman [EMAIL PROTECTED] wrote:
 And finally one problem:

 When I enter multiline text with EOL characters, I always get error
 message Message text required. Single line text is sent
 successfully.

This problem can be reproduced also at
http://www.pmwiki.org/pmform/PmForm/MailForm.

Roman

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm question

2007-06-11 Thread f.r.salomons

For my site, I installed the beautiful PmForm script to be able to 
receive comments by visitors. Now something what I would like to have, 
is that visitors who send a comment will also receive a copy of their 
message at their own email-address. Of course it has to be a separate 
mail, so that my own email-address is not revealed to them.
Is there a way to achieve this, or would that take a modification of the 
script?

Thanks,
Frits


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm question

2007-06-11 Thread Patrick R. Michaud
On Mon, Jun 11, 2007 at 09:27:13PM +0200, f.r.salomons wrote:
 
 For my site, I installed the beautiful PmForm script to be able to 
 receive comments by visitors. Now something what I would like to have, 
 is that visitors who send a comment will also receive a copy of their 
 message at their own email-address. Of course it has to be a separate 
 mail, so that my own email-address is not revealed to them.
 Is there a way to achieve this, or would that take a modification of the 
 script?

I think it can be achieved... but then how would you prevent someone 
from using the script to send spam to arbitrary mail addresses?

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm question

2007-06-11 Thread f.r.salomons
Patrick R. Michaud schreef:
 On Mon, Jun 11, 2007 at 09:27:13PM +0200, f.r.salomons wrote:
 For my site, I installed the beautiful PmForm script to be able to 
 receive comments by visitors. Now something what I would like to have, 
 is that visitors who send a comment will also receive a copy of their 
 message at their own email-address. Of course it has to be a separate 
 mail, so that my own email-address is not revealed to them.
 Is there a way to achieve this, or would that take a modification of the 
 script?
 
 I think it can be achieved... but then how would you prevent someone 
 from using the script to send spam to arbitrary mail addresses?
 
 Pm

O.k., I hadn't thought of that..
My concern is that, from the viewpoint of the visitor, it is strange 
that the message, after sending it, is literally gone. Maybe an 
alternative might be to show visitors their message after sending, with 
an option to save it as a pdf-file or print it?

Frits


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm question

2007-06-11 Thread Hans
Monday, June 11, 2007, 9:13:39 PM, f.r.salomons wrote:

 My concern is that, from the viewpoint of the visitor, it is strange
 that the message, after sending it, is literally gone.

In my experience this is the norm when submitting messages via a form
online. To have  a confirmation message that the message is sent
successfully is the best to be expected. To see the message still in
the form after posting would make me wonder if any posting did happen.

 Maybe an
 alternative might be to show visitors their message after sending, with
 an option to save it as a pdf-file or print it?

That may be nice, but not so easy to do.


  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm question

2007-06-11 Thread Vince Administration
One way to do this is to make sure that the author of the comment be  
authenticated. This will of course not work for public sites that
do not require authentication,

I would like a copy of the message sent to the wiki administrator. I  
have not looked at the PmForm documentation for a week or so, so it  
may be there.
Or it might be possible to have Notify do it.

   Vince

On Jun 11, 2007, at 3:36 PM, Patrick R. Michaud wrote:

 On Mon, Jun 11, 2007 at 09:27:13PM +0200, f.r.salomons wrote:

 For my site, I installed the beautiful PmForm script to be able to
 receive comments by visitors. Now something what I would like to  
 have,
 is that visitors who send a comment will also receive a copy of their
 message at their own email-address. Of course it has to be a separate
 mail, so that my own email-address is not revealed to them.
 Is there a way to achieve this, or would that take a modification  
 of the
 script?

 I think it can be achieved... but then how would you prevent someone
 from using the script to send spam to arbitrary mail addresses?

 Pm

 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] PmForm

2007-05-22 Thread Scott Connard
Patrick,

I know it's a wee bit against normal policy, but can you post a  
PmForm page that contains your current settings for the PmForm group  
(i.e., PmForm.php)?  I realize that the file may change and you may  
forget to update the wiki page, but I won't complain often.

I've started playing with it a bit and I figured that I'd have a  
better chance if I could see the config info.  It would save me from  
waiting until the documentation is complete.

Thanks,
Scott Connard.


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] PmForm

2007-05-22 Thread Patrick R. Michaud
On Tue, May 22, 2007 at 09:46:30PM -0400, Scott Connard wrote:
 Patrick,
 
 I know it's a wee bit against normal policy, but can you post a  
 PmForm page that contains your current settings for the PmForm group  
 (i.e., PmForm.php)?  I realize that the file may change and you may  
 forget to update the wiki page, but I won't complain often.

For the time being I've decided to move the PmForm demonstration
and documentation pages into a separate wiki from the normal pmwiki.org
set.  I think this will make it easier to create a variety of
PmForm demonstrations as separate wikigroups without cluttering the
main pmwiki.org site, especially as we're fleshing things out in
PmForm.  Once the demos are a bit more stable, and/or we know where
things are headed, we can see about merging it into the main site.

So, the new pmform site is at http://www.pmwiki.org/pmform/ .

In particular, the configuration files I'm using for that site
are all available at http://www.pmwiki.org/pmform/local/ .
But as you'll see, there's not a whole lot there -- just a few
entries into the $PmForm array.  Most of the configuration
takes place in the templates for the code.

Questions welcomed.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users