You are here: Foswiki>Tasks Web>Item10960 (10 Apr 2012, PaulHarvey)Edit Attach

Item10960: Implement a bibtex formfield type

pencil
Priority: Normal
Current State: Being Worked On
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: BibtexFormfieldPlugin
Branches: trunk
Reported By: PaulHarvey
Waiting For: MichaelMell, PaulHarvey
Last Change By: PaulHarvey
-- 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
 

ItemTemplate edit

Summary Implement a bibtex formfield type
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Extension
Component BibtexFormfieldPlugin
Priority Normal
CurrentState Being Worked On
WaitingFor MichaelMell, PaulHarvey
Checkins BibtexFormfieldPlugin:2e406ead28f8 BibtexFormfieldPlugin:3c8a4e621a2e BibtexFormfieldPlugin:91e51bf6e243 BibtexFormfieldPlugin:ffe507ca08b1 BibtexFormfieldPlugin:bc08db120501 BibtexFormfieldPlugin:2a1a12f98bf4 BibtexFormfieldPlugin:82c4371436f0 BibtexFormfieldPlugin:5b7a1dbb0c66 BibtexFormfieldPlugin:7cadb7b2fe29 BibtexFormfieldPlugin:558be4f64809 BibtexFormfieldPlugin:1c06ccd54d18 BibtexFormfieldPlugin:c40e0d67fd55 BibtexFormfieldPlugin:8f2611e5aac8 BibtexFormfieldPlugin:753067680585 BibtexFormfieldPlugin:ad5aaa700bf5 BibtexFormfieldPlugin:7f120f3ede22 BibtexFormfieldPlugin:e4b3b4ab25ae
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins BibtexFormfieldPlugin:2e406ead28f8 BibtexFormfieldPlugin:3c8a4e621a2e BibtexFormfieldPlugin:91e51bf6e243 BibtexFormfieldPlugin:ffe507ca08b1 BibtexFormfieldPlugin:bc08db120501 BibtexFormfieldPlugin:2a1a12f98bf4 BibtexFormfieldPlugin:82c4371436f0 BibtexFormfieldPlugin:5b7a1dbb0c66 BibtexFormfieldPlugin:7cadb7b2fe29 BibtexFormfieldPlugin:558be4f64809 BibtexFormfieldPlugin:1c06ccd54d18 BibtexFormfieldPlugin:c40e0d67fd55 BibtexFormfieldPlugin:8f2611e5aac8 BibtexFormfieldPlugin:753067680585 BibtexFormfieldPlugin:ad5aaa700bf5 BibtexFormfieldPlugin:7f120f3ede22 BibtexFormfieldPlugin:e4b3b4ab25ae
Topic revision: r23 - 10 Apr 2012, PaulHarvey
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