Priority: Normal
Current State: Being Worked On
Released In: n/a
Target Release: n/a
--
PaulHarvey - 11 Jul 2011
Regarding the field 'type'
bibtex
. It will
always be of the form
bibtex
or
bibtex+....
. It will never start with
text
or
textarea
.
This is because Foswiki::Form only considers the first part of the type field, up to but excluding the first + sign. So
bibtex+foo
will cause Foswiki::Form to use
Foswiki::Form::Bibtex
to render that field.
If you have
textarea+bibtex
, the Foswiki::Form::Bibtex package will never be called (to handle the field for rendering). It will use Foswiki::Form::Textarea to handle rendering of the field, and that package will ignore the
+bibtex
part.
So, please think of the
+foo
parts as modifiers or flags. And the first part of the field type as the root type for that field.
So, on that note, to be forward-compatible with future, not invented-yet
bibtex+
forms, we should really test for flags using a regex, something like
if ($fieldType =~ /\+atom\b/) { $isAtomType = 1; }
--
PaulHarvey - 23 Jul 2011
Ok. Good to know thanks. So then I would have to some query the '+atom' modifier to descide whether it should be rendered as text or textfield and do this withing Foswiki::Form::Bibtex?! Problem is that there are a couple of atom-fields that are better rendered as textfields such as 'abstract' and 'note'. How would we handle the rendering these?
--
MichaelMell - 23 Jul 2011
We could just do
bibtex+textarea
,
bibtex+text
,
bibtex+field+textarea
,
bibtex+atom+text
etc.
--
PaulHarvey - 23 Jul 2011