[pmwiki-users] EnableDrafts and PmForm

Petko Yotov 5ko at 5ko.fr
Wed Oct 22 11:09:43 CDT 2014

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.)


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".

More information about the pmwiki-users mailing list