Version 68 (modified by Steffen Hoffmann, 8 years ago) (diff)

announce form history browsing added tonight


Form history is accessible from the web_iu now, only presentation is quite raw.
Explore TracForm with TracSearch capabilities.
New db schema is out: Early adopters beware, make sure to have a backup Trac db before, please.
Maintainership handed over from rharkins to hasienda
Starting ticket list cleanup and triaging (open: 25)


Provides forms for ticket description and wiki pages

Notice: This plugin is unmaintained and available for adoption.


This plugin aims to allow for forms anywhere there is a field with Trac wiki syntax. This is meant to supersede the previously limited-scope ChecklistPlugin.

Release Status and Download

Stable Version tracformsplugin/tags/tracforms-0.2.1 [download:tracformsplugin/tags/tracforms-0.2.1 download] subversion
Under Development tracformsplugin/trunk [download:tracformsplugin/trunk download] subversion

The development branch trunk is usable with Python2.6; an older Python requires simplejson to be installed.
Revision [10011] and above requires some dedicated permissions assigned to use new (search) as well as known TracForms features ('Update Form' button).

You can also download the entire project [download:tracformsplugin here], or checkout a copy using subversion.

See installation below for details on how to install and configure the plugin.

Example and Documentation

Also consider viewing the online tutorial or the documentation (docs still under development)

Let's start by looking at a simple laundry list. This list will be automatically bound to whatever page it appears in by default (this can be configured). Once the plugin is installed, simply edit a new wiki resource called Sandbox/LaundryList and chuck this in:

== Laundry list example ==

# An example of a TracForm.  The first lines can be commentary or #! commands.
#! track_fields

|| || '''Who''' || '''When''' || '''What''' ||
|| [tf:wash] || [tf.who:wash] || [tf.when:wash] || Wash Clothes ||
|| [tf:dry] || [tf.who:dry] || [tf.when:dry] || Dry Clothes ||
|| [tf:fold] || [tf.who:fold] || [tf.when:fold] || Fold Clothes ||


Once saved, you should get something looking like this:

Example of blank laundry list

From here, you can check some things and click "Submit Query" you'll see the fields change. After a few clicks it might look like this:

Example after a few checks.

Now, if you thought that was neat, make sure you have the IncludeMacro installed and fire up a new wiki page Sandbox/LaundryListUser with the following:


Note that the form is blank and you can play with the results again. This is because the default context for the form is the page URL itself! That means that as long as a form is included on a different page (and the default context is not overridden), then each page including gets its own version of the form's results. This works particularly well with PageTemplates.

Now, for more fun, do the same thing in a ticket. Once submitted, every ticket including the template will contain it's own checklist. One obvious use for this is when creating a svn commit checklist. Simply put the checklist in the appropriate wiki location, create tickets that include the location, and voila, instant commit step-by-step. Once enough of the form becomes exposed, we should be able to work this into the workflow too (no resolving before at least paying lip service to the checklist).

There is much more planned for this plugin than simply checklists. See TracFormsPlugin/Docs for more information on the various ways to use this tool.

Bugs/Feature Requests

Existing bugs and feature requests for TracFormsPlugin are here.

If you have any issues, create a new ticket.


Once you have downloaded the source, do the following (your mileage may vary on the actual directory names depending on what you downloaded):

cd tracformsplugin
cd trunk
cd 0.11

For older versions or ones still in development, cd into tags and then into the desired version. For example, to use the 0.1 version:

cd tracformsplugin
cd tags
cd release-0.1
cd 0.11

Using TracFormsPlugin with MySQL

See ticket #3290 for a drop-in replacement for that should work with either versions prior to 0.2.1 (where it will be more transparent). Once you have, do something like the following depending on what exactly you downloaded:

cp /tmp/ tracforms/

Replace /tmp/ with the path to wherever you download the script to.

Now you can proceed to installation. I'm going to try to have this worked out by 0.2.1 so that it'll work both ways (and set up to eventually also work in postgreSQL, etc).

Thanks to the donator of this code (in #3290) for your help with the project!

Method 1: Lay an egg

From here, you can do one of two things. The first is building an egg to drop into your project's plugins directory or your master project's plugins directory (replace or define $TRACENV_DIR with your project's base directory):

python bdist_egg

cp dist/TracForms-0.1-*.egg $TRACENV_DIR/plugins/

Method 2: Full install

Or, you can build and install and enable the right bit in the configuration file (replace or define $TRACENV_DIR with your project's base directory):

python install
vi $TRACENV_DIR/conf/trac.ini

Within here, locate (or create) your [components] section and add the following:

 tracforms.* = enabled

Upgrading the database

Either of the above methods require a database upgrade...

trac-admin $TRACENV_DIR upgrade

About i18n/l10n support

The development version of this plugin is prepared for localization.
But English message texts are still the (POSIX) default. If this isn't your preferred language, you can do it yourself (see the l10n cookbook page for Trac plugins for more details).

You've done a new translation? Superb! Contributing your translation is highly appreciated.
You could send it to the plugin's maintainer or contribute to Trac plugin l10n project via Transifex as soon as it is included there (not yet).

Preparing the plugin from source requires no additional steps for compiling message catalog files. Only to include translations marked as # fuzzy by the translator, you'll want to do a manual message catalog compilation with the extra -f argument before packaging:

cd tracformsplugin/
python ./ compile_catalog -f
python ./ bdist_egg

Complaints about missing locale directory are often a side-effect of failure to compile any message catalog for inclusion into Python egg, hence the whole path is missing. Due to a know Trac issue Babel has to be installed prior to Trac, to get it all working as expected.
Again, for more details see the l10n cookbook page for Trac plugins.

Recent Changes

16960 by rjollos on 2017-11-06 23:38:37
TracForms 0.5dev: Remove debug print statement from r16386

Refs #13319.

16958 by rjollos on 2017-11-04 22:59:37
TracForms 0.5dev: Log exception from macro

Refs #13319.

16954 by rjollos on 2017-11-03 17:41:27
TracForms 0.5dev: Show traceback on exception

Refs #13319.



Author: rharkins
Maintainer: hasienda
Contributors: jrcutler

Attachments (2)

Download all attachments as: .zip