New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

What are the rules on form field names? Eg. Can they have spaces?

At Structure of a form definition in the DataForms topic, there is a note listed under "Field Name Name Notes":

/System/DataForms"> Field Name Notes:

  • Field names have to be unique.
  • A very few field names are reserved. If you try to use one of these names, Foswiki will automatically append an underscore to the name when the form is used.
  • You can space out the title of the field, and it will still find the topic e.g. Aeroplane Manufacturers is equivalent to AeroplaneManufacturers.
  • If a label field has no name, it will not be shown when the form is viewed, only when it is edited.
  • Field names can in theory include any text, but you should stick to alphanumeric characters. If you want to use a non-wikiname for a select, checkbox or radio field, and want to get the values from another topic, you can use [[...]] links. This notation can also be used when referencing another topic to obtain field values, but a name other than the topic name is required as the name of the field.
  • Leading and trailing spaces are not significant.

If you would like to customise the field name only visually (while keeping the FieldName constant), this is not possible with a default Foswiki. The recommended alternative is to make use of FlexFormPlugin and an auto view-template.

Support.FAQForm edit

TopicClassification FrequentlyAskedQuestion
Subject Data forms
Topic Summary Highlighting documentation in the DataForms topic regarding field naming rules/possibilities
Interested Parties
Related Topics DataForms
Topic revision: r3 - 27 Dec 2011, ArthurClemens - This page was cached on 10 Mar 2018 - 20:57.

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