archive_me1Add my vote for this tag create new tag
, view all tags
When moving TWikiPreferences into a form, I had a lot of problems with labels.

Basically I wanted the topic to be as small as possible, for fast loading, but I wanted the help information to be as rich as possible. When I included named label fields into the text, the title was the only part of the label shown on the for, which made it useless as help. Tooltip text is truncated - again useless. So I modified the code for labels to show the associated with the label in the right column.

OK so far; unfortunately TWiki is rather stupid and stores the value of the constant label in the file - meaning a lot of garbage appears in the file. So I changed things so that form fields with null labels don't get written out. That way the file stays small, and the label appears when you edit (because the form definition is read).

Unfortunately it means that when a form is displayed (rather than being edited) the help information doesn't appear (a mixed blessing IMHO) unless there is a label in the right column - in which case the label value gets saved to the file.

The only solution I can think of is to always read the form definition when displaying the form. At face value this is not an expensive thing to do, but when a form uses a lot of secondary topics to define e.g. checkbox and select box values, it could be a burden so I decided not to do it.

I think the new way (null labels don't get saved) is a good compromise - unless someone else can think of a better way.

I updated the docs in TWikiForms (on DevelopBranch) to describe the change.

-- CrawfordCurrie - 08 Apr 2005

Topic revision: r1 - 2005-04-08 - CrawfordCurrie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.