10 Aug 2016 - 11:34
Additional formfield types for DataForms
This plugin implements a set of additional special purpose formfields to be used in DataForm
To make use of these formfields use their type identifier in the
column of a DataForm definition, such as in
When defining a formfield additional parameters may be used in the
column to further customize the behavior of the element.
Known Formfield types
A formfield that is filled automatically based on values from one or more other formfields of the same topic. During an edit-save loop, values of fields listed in the
are extracted and concatenated using the specified
. Values of an
formfield cannot be edited by the user.
header: add an optional string prefixed to the field value, but only when the source fields are not empty
source: comma-separated list of one or more formfields to fetch values from
separator: separator used when concatenating all values into a new value for the
footer: append an optional string to the field value, but only when the source fields are not empty
A typical use-case for an
field is the construction of a TopicTitle based on other form properties:
A select box to chose an icon supported by Foswiki (famfamfam and fontawesome).
cat: list of icon categories to be included in the selection
include: regular expression of icons to include in the selection
exclude: regular expression of icons to be excluded from the selection
An icon category can be either a topic on the icon search path as defined in
famfamfam ... to select famfamfam icons only
silkicons ... to selec from a silk icon only,
flagicons ... to select a flag
Or an icon category as defined in the fontawesome definition:
- Brand Icons
- Chart Icons
- Currency Icons
- Directional Icons
- File Type Icons
- Form Control Icons
- Medical Icons
- Payment Icons
- Spinner Icons
- Text Editor Icons
- Video Player Icons
- Web Application Icons
Extract the numeric identifier from the topic name. This is most usefull for topics created using the
feature (see TemplateTopics
feature adds a numeric unique identifier when the topic is created. This identifier can be extracted using an
and stored into a DataForm and be available for formatted searches.
The value in the
column will be used to add leading zeros to the id. For example, given a topic FooBar1 has a DataForm
Then upon save the
formfield will have a value of
A general purpose IP4 address, consisting of 4 octets, e.g.
A hardware address given in 6 hex values, e.g.
A special IP address used for routing, consisting of 4 octets, e.g.
A standard telephone number. This formfield uses JQueryValidate
to make sure the formfield value is a valid phone number.
A drop-in replacement for the standard
formfield. See JQSelect2Contrib
A somewhat "smarter" checkbox formfield type. It allows to select one of the values as a placeholder representing "any" value in the selection.
So given this DataForm definition ...
... then selecting "Accross all Business Areas" will select all other areas with it. Likewise, selecting all
business areas indivudually will automatically select "Accross all Business Areas" as well.
Note that the "any value" selection is the one indicated by the "*" asterisk, or if not present the first in the list.
A time formfield using the clockpicker widget from http://weareoutman.github.io/clockpicker/
A topic reference using JQSelect2Contrib
web: the web the user can choose topics from; defaults to current web
default: the default value to use if no value exists yet
url: url for autocompletion, default:
TopicType: name of a TopicType to be selected
Custom parameters may be added. These will be appended to the autocompletion url.
There are a couple of parameters that further customize the behavior of the select2 widget. Some of the most useful ones are:
minimumInputLength: number of characters that have to be entered before the autocompletion url is called to fetch matching selections from the backend; default 0
quietMillis: number of milliseconds to wait for input before the backend is called for autocompletion
limit: maximum number of values fetched from the autocompletion backend, default 10
These are also available for the
A user reference using JQSelect2Contrib
url: url for autocompletion, default:
form: DataForm supposed to be attached to user profile pages; this form is used to search for users, default: UserForm
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions
for more help.
| Change History:
| 09 Apr 2015:
|| documentation; final bugfixing before release; updated to latest clockpicker
| 26 Mar 2015:
|| updated list of all fontawesom icons; fixed rendering of Topic formfields values
| 16 Dec 2014:
|| fixed thumbnails in user autocompletion; don't inherit from ListFieldDefinition for performance reasons
| 22 Aug 2014:
|| added smarbox formfield
| 04 Apr 2014:
|| fixed compatibility with foswiki >= 1.2.0
| 23 Sep 2010:
|| initial release
| Home page: