Hi, I use hierarchical_select for vocabulary
I want add tid in response url. And i can process with tid for my website.
i see code hierarchical_select.js

var ajaxOptions = {
    url:        url,
    type:       'POST',
    dataType:   'json',
    data:       post,
    beforeSend: function() {
      Drupal.HierarchicalSelect.triggerEvents(hsid, 'before-' + updateType, settings);
      Drupal.HierarchicalSelect.disableForm(hsid); 
    },

But i can not modify it work.
Any idea can help me?

Comments

wim leers’s picture

Status: Active » Fixed

Set
$_GET['tid'] = 999;
before HS runs and that'll happen automatically.

:)

cuxi’s picture

Hi Wim Leers
Thanks you reply.
but i don't know where add to your code.
Please help me

wim leers’s picture

I don't know your code or what exactly you're doing so I can't help you with that. That's up to you.

cuxi’s picture

Hi Wim Leers.
I have 3 field: City , distrist and project

I want when I select city then show distrist and project of that city.

I use taxonomy for city and distrist and a field cck select list for project.
So, I have a table project: with field: tid and project name ( tid project is tid of term),

When i select city then hierarchical_select show distrist but it can't show project in a other box.
So i want GET['tid'] city and Select all project form database where tid = GET['tid'].
then i apply to cck field project.

cuxi’s picture

Hi , Wim Leers.
I add code to:

 var tid = $('#edit-taxonomy-1-hierarchical-select-selects-1').val();
  // Pass the hierarchical_select id via POST.
  post.push({ name : 'hsid', value : hsid });
   post.push({ name : 'tid', value : tid });

$tid = $_POST['tid'];
and now it's work.
thanks you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.