[pmwiki-users] AddDeleteLine version 2.0beta2
nk at knappi.org
Sun Sep 24 05:59:26 CDT 2006
Martin Fick schrieb:
> --- Nils Knappmeier <nk at knappi.org> wrote:
>> Also note, that it is yet not possible to specify
>> the target page in a text formfield.
> Sure you can! :) Since you specify the target in a
> hidden field at the beginning of the form (thanks), it
> can easily be overridden anywhere else in the form by
> simply specifying another input field name with the
> same name "n". PHP will pick the last value
> specified. I've done it with your recipe! Use:
> Target Page: (:input text name="n":)
>> And I'd like to discuss methods on how to handle
>> arrays (multiple checkboxes of textfields with
>> the same name), before taking code for this into
>> the recipe. I can see no way that is easily
>> implemented or understood and I'd like to have
>> something easy.
> Sure, I sent you a copy of a solution in another
> thread labeled "2.0beta6" by accident (sorry, a reply
> to your offlist message). I think it is rather easy,
> if you don't think so, maybe an example would help:
I don't like the idea of just adding a hidden field in the form for
1) It seems to be an unclean way of doing things, overriding
one field entry with another one. I don't know if it is standardized,
that every browser sends the fields on the post-request in the exact
order in which they occur in the HTML page. I don't know if PHP
always takes the last value of the field. Seems to be something that
might work, but may also fail.
This was actually the reason, why I added the "target=" option in the
2) This does not work it you use CleanUrls. At least that's
what I figure. I you look into the target URLs of the e.g.
the edit form on pmwiki.org, you'll see, that the pagename
is also part of the target-Atribute of the <form ...> element.
I'd like to be corrected, if I'm wrong, but this seems to be
essential for $_POST-ing form data to a page. I can't say I fully
understand why, but when I tried to ...
Well, that's weird, it seems to work... Mhm, I don't understand...
It didn't work, when the target was set to $ScriptUrl...
3) In PmWiki it is common that a link to [[SomePage]] leads to
CurrentGroup.SomePage. If a form allows you to enter a page name
(such as the (:newpagebox:) for example, than this should have the
same behavior in my oppinion.
Alright, it seems to work, so there is no urgent need to do anything
I am impressed, anyhow.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3318 bytes
Desc: S/MIME Cryptographic Signature
Url : /pipermail/pmwiki-users/attachments/20060924/76f44a8b/attachment.bin
More information about the pmwiki-users