tags:

views:

16

answers:

1

Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like:

Tree Parent
.|Child 1
....|
_Child 1.1
.|_Child 2

Redirect action must occour only on the last items: Child 1.1 and Child 2 Destination of creat different content types, will be defined in js array. But how to send hierarchical select value to, destination add content type? Maybe like redirect_url?tid_value=value123. I have to save all taxonomy path, but it would be enouth to get deepest one tid value. Should i use multipage approuch here? Any solusion?

A: 

Answering to my question:

create new module, like 'enter_content'.

In this module i am loading javascript file, which binds ...bind('change-hierarchical-select', ... with custom js function, to all hierarchical select field elements.

When happens On change event, js checks for element class ...hasClass('has-no-children').

So when there is no childrens i am doing redirect to my desired create content type form.

liutis