depth == 1) { //si el termino es padre $options[$term->tid] .= $term->name; } } $form['value']['sector'] = array( '#type' =>'select', '#options' => $options, // '#default_value' => $this->value['sector'], ); } function query() { $aid = explode('_',$this->field); $aid = $aid[1]; $this->ensure_my_table(); $field = "$this->table_alias.$this->real_field"; $upper = ''; $operation_attribute = "="; if($this->operator == 'not in') { $operation_attribute = '<>'; } if(!is_array($this->value)) { $this->value = array($this->value); } foreach ($this->value as &$value) { if ($value) { $this->query->add_where($this->options['group'], "$upper(%s) %s %d", $field, $operation_attribute, $value); } } } }