[pmwiki-users] Simple forms, but which processor?

Mark Bacas mbacas at gmail.com
Sun Feb 28 09:10:17 CST 2010


Or maybe it is something with my form?

[[#journalform]]
(:input pmform target=journaldata :)
(:input default source={*$FullName} :)
(:input default request=1 :)
(:messages:)
|| %purple%'''Summary: '''||(:input text $:summary size=50:)||
|| %green%'''Status: '''||(:input text $:status size=50:)
|| '''Description: '''||(:input textarea $:description rows=20 cols=60:)||
|| '''Notes: '''||(:input textarea $:notes rows=20 cols=60:)||
|| '''Release Notes: '''||(:input textarea $:relnotes rows=5 cols=60:)||
|| '''See Also: '''||(:input textarea $:seealso rows=5 cols=60:)||
|| %green%'''Q: '''||(:input textarea $:Q rows=3 cols=60:)||
|| %red%'''A: '''||(:input textarea $:A rows=3 cols=60:)||
|| ||(:input submit:)||
(:input end:)
[[#journalformend]]

[[#journalpost]]
(:template defaults
savevars=$:summary,$:status,$:description,$:notes,$:relnotes,$:seealso,$:Q,$:A
:)
[[#journalpostend]]

Regards,

 - Mark

On Sun, Feb 28, 2010 at 9:16 AM, Mark Bacas <mbacas at gmail.com> wrote:
> I wonder if it is the "newticket" function (powertools.php) that is
> taking me straight to the edit form? Is it possible that I need to
> change this?
>
> # add markup expression {(newticket Group)}
> # creates auto increasing pagename of format
> # Group.20061220001 (date and 3 digit number)
> $MarkupExpr['newticket'] = 'MakeNewTicket($pagename, $args[0])';
> function MakeNewTicket($pagename, $grp) {
>   if (!$grp) $grp = PageVar($pagename, '$Group');
>   foreach(ListPages("/^$grp.\\d{11}/") as $p)
>       $issue = max(@$issue,substr($p,-11));
>   $issueday = substr($issue,0,8);
>   $today = strftime("%Y%m%d", time());
>   if($issueday==$today) {
>      $nextissue = $issue+1;
>      $target = $grp.".".$nextissue;
>   }
>   else $target = $grp.".".$today."001";
>   return $target;
> }
>
> Regards,
>
>  - Mark
>
> On Fri, Feb 26, 2010 at 12:23 PM, DaveG <pmwiki at solidgone.com> wrote:
>>
>>
>>> On Thu, Feb 25, 2010 at 2:48 PM, Mark Bacas<mbacas at gmail.com>  wrote:
>>>>
>>>> So, I'd like to have a button or link I click on which creates a
>>>> newticket (powertools) that brings me to a form that I fill out. The
>>>> form would have some PTV that I can key off of for my pagelist
>>>> process. I think I was almost there with PmForm but I came to the edit
>>>> screen first which I had to Save first and then I'd see the form to
>>>> fill out. I just want to be brought straight to the form.
>>
>> There are a couple of pages on PmWiki around PmForm. The main one is
>> http://www.pmwiki.org/pmform/, and this has links to a few examples. I know
>> I missed this when I started, so just pointing it out.
>>
>> That is possible with PmForm -- you should need to goto the edit page. Are
>> you able to post an example of what you are doing, or a URL? When you define
>> the $PmForm you need to specify the 'saveto' parameter.
>>
>>>> Also when I
>>>> have my list of pages processed by pagelist I'd like to be able to
>>>> click on a link that would bring up the form to allow me to edit/add
>>>> new data to the existing form.
>>
>> The easiest way is to have the pmform directive as part of the page group
>> header. So with the PmForm variables forming the content of the page, the
>> header now uses those variables to pre-populate the form. So the group
>> header would be:
>> (:pmform my-form:)
>>
>>
>>  ~ ~ Dave
>>
>



More information about the pmwiki-users mailing list