Drop Down List again

Sorry that I post this discussion again but I've see that it is private and I want it public.

I have a module and for a menu link will be displayed a form.
1. In this form I have 2 select element. First element is populated with some authors name. The second select element must be populated with the books for the selected author from the first select element.
2. For each selection in first select element, the option array for the second element must change.
3. I must have a second submit button, or a button and have option to call a function when I press on it.

If anybody could help me with any idea, suggestion, documentation.

Thank's!

Comments

So, anybody any idea?

So, anybody any idea? I have the same problem

The book nodes have a Node

Garrett Albright's picture

The book nodes have a Node Reference field which references author nodes. The menu for selecting books on this form will have all books in it (for JS-disabled friendliness), but a bit of JS (which you will have to write yourself, alas) will strip all books not by the author selected in the form's author menu from the book menu. No AJAX necessary.

Sorry but Drupal can't do everything without coding. You're either going to have to write this or hire someone to do so.

Sorry for confusion Here is

Sorry for confusion
Here is not about author and book from drupal core
I made modules from a book library with : author, editor, book ...
I wrote the code that fill second drop down list after selection changed in the first drop down list and this work grate.
If I want to submit the form I receive a error "An illegal choice has been detected. Please contact the site administrator." and the second drop down will be with red bounds.

Javascript

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week