--- a/doc/book/en/development/webstdlib/autoform.rst Tue Jan 19 09:51:38 2010 +0100
+++ b/doc/book/en/development/webstdlib/autoform.rst Wed Dec 16 14:19:01 2009 +0100
@@ -1,8 +1,25 @@
The automatic entity form (:mod:`cubicweb.web.views.autoform`)
---------------------------------------------------------------
+Tags declaration
+~~~~~~~~~~~~~~~~~~~~
+
It is possible to manage attributes/relations in the simple or multiple
-editing form thanks to the following *rtags*:
+editing form thanks of the methods bellow ::
+
+ uicfg.autoform_section.tag_subject_of(<relation>, tag)
+ uicfg.autoform_section.tag_object_of(<relation>, tag)
+ uicfg.autoform_field.tag_attribute(<attribut_def>, tag)
+
+Where ``<relation>`` is a three elements tuple ``(Subject Entity Type,
+relation_type, Object Entity Type)``. ``<attribut_def>`` is a two elements tuple
+``(Entity Type, Attribut Name)``. Wildcard ``*`` could be used in place of
+``Entity Type``
+
+Possible tags are detailled below
+
+Simple Tags
+~~~~~~~~~~~~~~~~~~~~
* `primary`, indicates that an attribute or a relation has to be
inserted **in the simple or multiple editing forms**. In the case of
@@ -29,3 +46,24 @@
If necessary, it is possible to overwrite the method
`relation_category(rtype, x='subject')` to dynamically compute
a relation editing category.
+
+
+Advanced Tags
+~~~~~~~~~~~~~~~~~~~~
+
+Tag can also reference a custom Field crafted with the help of
+``cubicweb.web.formfields`` and ``cubicweb.web.formwidget``. In the example
+bellow, the field ``path`` of ``ExecData`` entities will be done with a standard
+file input dialogue ::
+
+ from cubicweb.web import uicfg, formfields, formwidgets
+
+ uicfg.autoform_field.tag_attribute(('Execdata', 'path'),
+ formfields.FileField(name='path', widget=formwidgets.FileInput()))
+
+
+
+
+
+
+