[pmwiki-users] EnableDrafts and PmForm

Randy Brown randy at brownragfilms.com
Mon Nov 10 12:42:51 CST 2014

Oops, I forgot to change the subject on my last post. Here it is again, with the subject line inserted.

It would be *very* useful to enable Drafts and Preview functionality in PmForm. 

I use PmForm as an alternative to action=edit when the page is well structured via page text variables. The technique lets authors update page content without having to look at all the markup - which can intimidate some beginners. I even have a field for a user-entered Change summary that I post along with the updated variables, similar to the normal edit form. However, the lack of Draft and Preview functionality in PmForm is a counter-weight to the simplified user-interface benefit. 

Can PmForm be changed to support Drafts and Preview? If so, that would be fantastic!


> Date: Mon, 3 Nov 2014 20:25:06 -0500
> From: Criss Ittermann <crisses at kinhost.org>
> To: Petko Yotov <5ko at 5ko.fr>
> Cc: PmWiki Users <pmwiki-users at pmichaud.com>
> Subject: Re: [pmwiki-users] EnableDrafts and PmForm
> Message-ID: <0CA46179-1F11-4DA1-B220-2922549F4B01 at kinhost.org>
> Content-Type: text/plain; charset="us-ascii"
> I finally got to try it out, and the hidden field didn't behave as desired.  In fact, I'm not sure anything happened at all.
> Would the first example you gave cause problems for another pmform, such as one that sends emails?
> Crisses
> On Oct 22, 2014, at 12:09 PM, Petko Yotov <5ko at 5ko.fr> wrote:
>> The current implementation could be changed to require Publish permissions when Drafts are enabled but it would require a password for the data page _before_ trying to save the draft version:
>> if ($_REQUEST['action'] == 'pmform')
>>   $HandleAuth['edit'] = 'publish';
>> Instead, try adding a hidden field inside your pmform template, something like:
>> (:input hidden postdraft 1:)
>> This should cause the post to be considered as if the user had pressed the "Save draft" button while editing the page, so the Draft page will be filled. (Unless I don't quite understand what you're trying to do.)
>> Petko
>> On 22.10.2014 12:24, Criss Ittermann wrote:
>>> When a PmForm writes to another page, it doesn't respect the
>>> $EnableDrafts and $EnablePublishAttr features.
>>> Is there a way to require a PmForm respect these settings?
>>> We have 2 levels of author: admins & members. When a member uses a
>>> PmForm to change their profile, it should be approved by an admin
>>> before going public. I'm using the drafts system but member data is
>>> being stored in a "secret data area".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20141110/f7c69b48/attachment-0001.html>

More information about the pmwiki-users mailing list