Active
Project:
Content Taxonomy
Version:
6.x-1.0-rc2
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2011 at 11:02 UTC
Updated:
23 Aug 2011 at 11:34 UTC
Hello.
I'm building a custom form and I'd like to use the content_taxonomy_autocomplete_load in one of the form field.
I'm looking for documentation to see if there is some way to make this, but I don't find nothing.
Please can you help me with any suggestion?
====edit===
after debuging a node-form that have the same field I'm trying this code.
<?php
$form['add']['centrotrabajo'] = array(
'#type' => 'content_taxonomy_autocomplete',
'#title' => t('Centro de trabajo'),
'#autocomplete_path' =>'content_taxonomy_autocomplete_value',
'#vid' => 9,
'#required' => TRUE,
'#delta' => 0,
'#field_name' => 'field_medico_centro_trabajo',
//'#tree' => TRUE,
//'#type_name'=> 'medico',
'#default_value'=> array(),
?>
the poblem is that always say that the field is empty althought I have choose one or two options.
This is the debug from devel when I make a dpm($form_state);
"El campo Centro is required"
storage (NULL)
submitted (Boolean) TRUE
values (Array, 10 elements)
centrotrabajo (String, 0 characters )
value (String, 28 characters ) Centro de Salud Lorca Centro
provincia (String, 3 characters ) 300
puesto (String, 3 characters ) 172
op (String, 7 characters ) Guardar
submit (String, 7 characters ) Guardar
form_build_id (String, 37 characters ) form-41eee21859b40f3be8758c44533fc30b
form_token (String, 32 characters ) 47c47616cdbca90f523b498e7a85ddb7
form_id (String, 16 characters ) _add_experiencia | (Callback) _add_experiencia();
(Array, 1 element)
clicked_button (Array, 18 elements)
process_input (Boolean) TRUE
With two element selected
... (Array, 5 elements)
storage (NULL)
submitted (Boolean) TRUE
values (Array, 10 elements)
centrotrabajo (Array, 0 elements)
value (String, 61 characters ) "Centro de Salud Lorca Centro", centro de salud...
"Centro de Salud Lorca Centro", centro de salud villarrobledo
provincia (String, 3 characters ) 300
puesto (String, 3 characters ) 172
op (String, 7 characters ) Guardar
submit (String, 7 characters ) Guardar
form_build_id (String, 37 characters ) form-73aee20f8ab89cd901c40392570fcdb3
form_token (String, 32 characters ) 47c47616cdbca90f523b498e7a85ddb7
form_id (String, 16 characters ) _add_experiencia | (Callback) _add_experiencia();
(Array, 2 elements)
clicked_button (Array, 18 elements)
process_input (Boolean) TRUE
thanks Oskar