By briantes on
Hello. I have three content types:
Category
- title
- body
SubCategory
- title
- nodereference to Category
- body
Products
- title
- nodereference to Category
- nodereference to SubCategory
- body
When I create a new node of type 'Products', I have to select one Category and one SubCategory. The question is how could I dynamically filter SubCategory with the category selected in the prior field?
I think It must be done with AHAHA, but I don't know where could I put the code to do it and how to do it?
Any suggestion?
Thanks.
Comments
With node reference, you have
With node reference, you have the possibility to use a view to display the possible items. This option also provides an argument field. I haven't used this argument field before, but it might be possible to populate it with the selected category.
If it's possible to populate the argument field with another cck value in the same node, your problem is solved. I will do some research about this as well. I'll let you know if i find something.
Hello. Thanks for your answer
Hello. Thanks for your answer but the problem is those arguments are static, that is, you can put a value when you create the field, but It can't be changed when creating 'products' node.
I have done some changes to cck nodereference to let 'php arguments', but It can't solve the problem.
Because I need to change it without reload the page, I need to do it in AHAHA or AJAX to change the view.
Hi. I change the answer. Is
Hi. I change the answer.
Is there any way to add some javascript code associated to a ckk field?
Haven't tried it before, but
Haven't tried it before, but this might work:
in your template.php file, add this:
replace "themeName" with your theme name, and the path with your script's path.
This code should add a custom js file in the section of your node/add and node/edit pages
Be sure to clear cache and rebuild theme registry
I had a similar problem - not
I had a similar problem - not exactly the same - #780630: How to use views_arg_context in a multireferential manner?
This module may be what you are looking for: http://drupal.org/project/hierarchical_select
After some months of search
After some months of search and try-error, I can't do it.
Someone could help me?
When adding/editing a new node, How could I filter the second cck field (subcategory) with the value selected in a prior field (categories)?
Dependent Fields
Try this: http://drupal.org/project/dependent_fields
Thank you very much. That's
Thank you very much.
That's what I need