Motivation
The
TWikiForms definition table currently has a column for attributes. Possible values are
M for mandatory, and
H for hidden.
For some types it is useful to have extended attributes that are type specific. For example, the
AutocompletePlugin has these additional parameters currently only available when using
%AUTOCOMPLETE{}%, not if type
autocomplete is used in TWikiForms:
class="",
style="",
selectstyle="",
containerstyle="",
type="".
Description and Documentation
Enhance the
TWikiForms handling to allow
key="value" configure attributes, in addition to the
M and
H attribute in Form field definition.
The
M and
H flags are deprecate (but remain for compatibility) in favor of more verbose
mandatory="1" and
hidden="1", respectively.
If used together with an
M and
H attribute flag,
key="value" configure attributes must be specified after the attribute flag(s).
Examples
Example with
autocomplete type:
Same example adding the mandatory attribute:
Same as before, using deprecated
M flag:
Impact
Implementation
The code handling the
M and
H attributes needs to be fixed to ignore
key="value" configure attributes because keys or values may contain
M and
H characters.
--
Contributors:
Peter Thoeny - 2014-10-13
Discussion
Looks sensible and useful.
--
Hideyo Imazu - 2014-10-14
I am wondering if we should deprecate the
M and
H flags in favor of
mandatory="1" and
hidden="1", respectively. If we do we should keep the
M and
H for compatibility.
--
Peter Thoeny - 2014-10-14
Accepted by release meeting at
KampalaReleaseMeeting2014x10x16.
The M and H flags should deprecate in favor of mandatory="1" and hidden="1", respectively.
--
Peter Thoeny - 2014-10-17
This is now done.
--
Peter Thoeny - 2014-12-16