Feature Proposal: Provide option to hide certain TWikiForm fields in view.
Motivation
Sometimes it is desireable to hide some or all of the
TWikiForm fields in view, either because the information contained is not for general consumption or merely to simplify the rendered view.
Description
What is proposed it to have a form field attribute which allows the field to be editable in edit mode, but not to be shown when the form is being rendered. This feature idea grew out of discussion in
HiddenTopicSpecificSettings
--
LynnwoodBrown - 02 Jun 2005
Impact and Available Solutions
Note: Patch is attached as
https://www.twiki.org/p/pub/Codev/TWikiFormWithHiddenType/twiki-foo-bar-patch.diff. The patch is against the
TWikiAlphaRelease of
15 Feb 2004.
Documentation
Here's the relevant part from (for)
TWikiForms
- The
Attributes column is used to define special behavior for that form field (multiple attributes can be entered, with or without separators):
- An attribute
H (for Hidden) indicates that this field should not be shown in view mode. However, the field is available for editing and storing information.
Examples
A form field is marked as hidden by placing
H into its
Attributes column. For example:
Implementation
Any comments on how the feature is implemented or could be improved
Discussion:
This is a sensible enhancement. May I suggest to rename this topic to
TWikiFormWithHiddenType to make it analogous to the
TWikiFormWithLabelType feature.
- Name change makes sense to me. - LB
--
PeterThoeny - 03 Jun 2005
In
SVN 4349
--
ThomasWeigert - 04 Jun 2005
What's the interface for this? Is there some extended syntax for
TWikiForms or is it something that only plugins will be using?
Also, a brief description under the #Implementation heading above describing the new form field attribute and what values it takes would be nice.
--
SamHasler - 06 Jun 2005
There is no special interface. The usage is as described in the documentation for
TWikiVariables (on
DevelopBranch). Just put an "H" (case-insensitive) into the attributes column of the form definition.
The implementation is simple.
RenderDotPm does not render such fields.
Not sure what you are looking for in terms of documentation beyond the doco in
TWikiVariables.
--
ThomasWeigert - 07 Jun 2005
Now I am confused. Shouldn't that be a new field type spelled out as
hidden, documented in
TWikiForms ?
--
PeterThoeny - 07 Jun 2005
No. The field type is whatever it is (label, select, text, etc.). That supports the editing of the field. Hidden is an attribute that tells us that we do not show this field in the view page. (At least these were Lynnwood's requirements...)
--
ThomasWeigert - 09 Jun 2005
You can't edit field meta attributes though. So how does it get set?
I can't find any reference to hidden fields on
http://develop.twiki.org/~develop/cgi-bin/view/TWiki/TWikiVariables
is that where I should be looking or should I be checking the documentation in
SVN?
--
SamHasler - 09 Jun 2005
it's in
http://develop.twiki.org/~develop/cgi-bin/view/TWiki/TWikiForms
(for how to define forms)
--
WillNorris - 09 Jun 2005
Sam, field attributes are part of the form definition. You edit those when you create (or change) the form definition...
--
ThomasWeigert - 09 Jun 2005
Thanks Thomas for the clarification, and thanks
FranzJosefSilli for fixing the docs above.
--
PeterThoeny - 10 Jun 2005