[pmwiki-users] Form attributes array . . .
Patrick R. Michaud
pmichaud at pobox.com
Thu Feb 23 07:34:03 CST 2006
On Thu, Feb 23, 2006 at 07:20:54AM -0600, Ben Wilson wrote:
> I took the liberty of finding the array that manages which attributes
> are recognized and aren't, which is governed by an
> array-which-shall-remain-nameless (because I can't remember it).
$InputAttrs.
> The
> array is populated by SDV(), which, IIRC, only populates when there
> are no values. I thought the proper way of populating an array (now)
> is SDVA(), which allows the admin to designate a field without
> excluding all others. Am I being misled by faulty recollection?
Both are proper -- SDV() is used for populating a single value (which
can be a simple variable or an element in an array), while SDVA
is useful for populating a lot of key=>value pairs at once,
avoiding the need to call SDV multiple times.
In the case of $InputAttrs, just one variable is being initialized
($InputAttrs), and they aren't key-value pairs, so SDV() is used.
PmWiki doesn't allow the "onChange" and other javascript attributes
because they can be big security risks. But yes, it's okay to add
"onChange" to $InputAttrs if your authors are trustworthy.
Pm
More information about the pmwiki-users
mailing list