Reply to comment
Dynamic selectbox in Drupal
For a subscribing form I need a dynamic selectbox, which was reloaded when a first selectbox was changed.
I tried activeselect, which worked in my testing environment, but not on the actual site which had a hook_regions (bug: http://drupal.org/node/125451).
Hierarchical select was just not the way to go in case of this site. It required the use of vocabularies, while I was working with database content directly. And so many other solutions I tried, but without the wished result. After some searching I found this: http://f5sitedesign.com/drupalcamp.
After modifying the module, I finally had it working.
Attached you can find a simple module. As you can see in the code it requires the location module and some content in the db. I'll see if I can provide some data for in the location db.
It provides a lillte module for subscriptions. In this case it's for selecting a province which will load the second selectbox with offices in that province. It's not the best example. because for this you can use HS, but atleast you get an idea.
The module provided at the drupalcamp site shows an example with replacing text in a div and the principal for this is just the same. So you can replace anything you want as long as you have an id to hook in to.
| Attachment | Size |
|---|---|
| inschrijven.tar_.gz | 8.63 KB |



Recent comments
50 weeks 4 days ago
51 weeks 2 days ago
1 year 15 weeks ago
1 year 16 weeks ago
1 year 18 weeks ago
1 year 21 weeks ago
1 year 26 weeks ago
1 year 26 weeks ago
1 year 29 weeks ago
1 year 31 weeks ago