[development] Want to merge free tagging & list forms for terms.

Doq Doques doques at gmail.com
Thu May 18 16:57:05 UTC 2006


Hi!
Currently developing module called "label". It povides per-user term
access. Label vocabularies can be used e.g. for personal nodes
categorization, for private message nodes etc.
The problem is that I want to allow user to enter new labels (terms)
using both list & free tagging fields. Taxonomy allows me to have
free-tagging or (not and) normal vocabularies.

I have decided to edit taxonomy module to support both of them.

The problem is that form elements are constructed in such a way:

        $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' =>
'textfield',

        $form['taxonomy'][$vocabulary->vid] =
taxonomy_form($vocabulary->vid, array_keys($default_terms),
$vocabulary->help);

so weights will be applied and I will receive all normal vocabularies
upper all free-tagging vocabularies.

Have tried to use form_render for
$form['taxonomy']['tags'][$vocabulary->vid] and
$form['taxonomy'][$vocabulary->vid] and then making
        $form['taxonomy_data'] = array(
          '#type' => 'markup',
          '#value' => $curr_form,
          '#tree' => TRUE,
of them, but it doesn't work correctly.

Any help? Maybe some better approach?


More information about the development mailing list