[pmwiki-devel] PmForm Q?

Simon nzskiwi at gmail.com
Mon Aug 12 14:14:19 PDT 2024


Thanks Petko, that was it, I had not refreshed the configuration form and
had changed the length of the field names.
(and yes I was confused about PmForm because I had just been looking at it
for another purpose)

On the topic of
$conf = extGetConfig($MyDefaultValues);

I believe that $conf should only make visible to the recipes values that
are related to the recipe itself (i.e. all other recipe variables should
not be visible)
I am starting to understand this include:
* calculated variables for the current page (from recipe's form)
* saved config variables (from recipe's form)
* x variables for the recipe (e.g. xAction)
* = variables for the recipe (e.g. =url)

Some feedback - i find the access to the configuration variable the most
confusing part.
For example what is it with the [0] part of $conf['=conf'][0] ?

Its probably too late to change things, but perhaps something like this
would be clearer
$conf = extGetConfig($MyDefaultValues); # returns the following arrays:
 $conf['=']['VarName'] ; #
 $conf['x']['Varname'] ; #
 $conf['f']['FieldName'] ; # form configuration values for current page
 $conf['sc']['FieldName'] ;# saved form configuration values as entered on
Extension hub

Also, please consider making the "Applies to pages:" text box two or three
times wider, or deeper by allowing it to have multiple lines (so a list of
pages can extend over several lines)

thanks very much

Simon

PS I can't wait for ExtensionHub to be included in the PmWiki releases

On Tue, 13 Aug 2024 at 00:47, Petko Yotov <5ko at 5ko.fr> wrote:

> On 12/08/2024 14:04, Simon wrote:
> > I'm scratching at straws here, is it possible that PmForm truncates
> > the name token from the input tag
> > e.g.
> > <input type="checkbox" name="enableSRTBL" value="true"
> > id="enableSRTBLShow">
> >
> > is returned (thru ExtensionHub) as
> > $conf ['=conf'][0]['enableSRTB']
> > (note the last character is truncated)?
>
>
> Um, ExtensionHub doesn't use PmForm.
>
> ExtensionHub shouldn't truncate the field names. However, while working
> on an extension, if you modify a field name, and a value with a
> different name was previously saved, the old value will appear in $conf.
>
> In such a case, just repost the configuration form, and the old value
> will be cleared.
>
> BTW note the difference between $conf['FieldName'] and
> $conf['=conf'][0]['FieldName']. The former is the one calculated for the
> current page; the latter is one of the saved configurations.
>
> Petko
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20240813/34d4adb4/attachment.html>


More information about the pmwiki-devel mailing list