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
- 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
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
constant), this is not possible with a default Foswiki. The recommended alternative is to make use of FlexFormPlugin
and an auto view-template