This question about Topic Markup Language and applications: Answered but needs rewriting

how to use "title" in System.DataForms (instead of "name")

definition of DataForms look like this:

Name Type Size Values Tooltip message Attributes
TopicSummary text 80   add a summary  

but if you look into the source, there is an additional 'title' that is not defined:
%META:FIELD{name="SystemDev.TopicSummary" attributes="" *title="SystemDev.TopicSummary"* value=""}%
Is there a way to have a title different to the name?
could this be done like this:

Name Type Size Values Tooltip message Attributes Title
TopicSummary text 80   add a summary   Summary

and it should lead to
%META:FIELD{name="SystemDev.TopicSummary" attributes="" *title="Summary"* value=""}%
and the displayed title of the field with view skin should be 'Summary'
I wanna use this for:

  • rename fields: only rename title to
    1. not break queries and
    2. not loose data when editing existing topics
  • field 'names' that are a link to a topic with a wiki name (TopicSummary),
    but the field 'name' shall displaying the (probably) different 'title' (e.g. Summary)
-- MatthiasThullner - 24 Jul 2010

One way is to use [[TheField][Arbitrary title? Yes!]], as you've noted.

To truly customise the way forms are displayed, you should consider a custom view (and edit, if necessary) template. The easiest way is to make use of AutoViewTemplatePlugin which will ship with Foswiki 1.1 by default.

In these circumstances I would properly refactor your DataForm and existing topic set to use a new field name. This might use sed or the GlobalReplacePlugin to rename all occurances of the old field names to the new.

-- PaulHarvey - 02 Aug 2010

Hey folks!

Having the same question since a long time. Using the suggestion of PaulHarvey[<nop>[TheField][Arbitrary title? Yes!]] does not work!

Posted as bug Tasks.Item10025.

Oops, you're right. What was I smoking that day? smile

The best way is to use FlexFormPlugin and a custom view template via AutoViewTemplatePlugin

Seems like we are missing the feature to easily have a link title different to the field name.

-- PaulHarvey - 15 Nov 2010

QuestionForm edit

Subject Topic Markup Language and applications
Version Foswiki 1.0.9
Status Answered but needs rewriting
Topic revision: r4 - 15 Nov 2010, PaulHarvey - This page was cached on 14 Jan 2020 - 16:30.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy