Tested with:
Drupal 6.14
CCK 6.x-2.5
Dependent 6.x-1.x-dev
Example:
Created 2 CCK fields:
field_test - Text (Select list)
field_test2 - Text (Select list) Depending on choice from field_test
When you try to add new node, JavaScript in page fails.
Thanks for any help
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | dependent-624852.patch | 11.78 KB | aaronbauman |
| Disabled Dependent field | 38.9 KB | grafik | |
| Enabled Dependent field | 36.94 KB | grafik |
Comments
Comment #1
summit commentedSubscirbing, greetings, Martijn
Comment #2
rburgundy commentedsubscribing
Comment #3
aaronbaumanCan you tell me your browser / OS?
If possible, can you please enable script debugging and let me know the text of the javascript error?
Comment #4
aaronbaumanThis patch is an overhaul of dependent's UI implementation, from the module/fields side to the actual .js file.
Previous version(s) of this module relied on naming conventions and imprecise jquery selectors to implement the js functionality.
This version implements its functionality in the theming layer instead of the forms API.
This allows exact targeting of dependent elements by DOM id, rather than by field type.
Such an implementation offers greater flexibility for future development, and should offer increased reliability and performance (and dependent.js reduced from 110 to 68 lines).
Also fixed misspellings of "submission" in dependent.module
I'll roll this into dev if we can get a couple reviews.
THIS PATCH ADDS A HOOK_THEME: BE SURE TO CLEAR YOUR CACHE AFTER APPLYING THE PATCH.
Comment #5
Bilmar commentedsubscribing
Comment #6
kansaj commentedTried solution in #4.
the following problem appeared:
>Submit Preview buttons appeared after the first field in the node and not as a last ones.
> If I have more than one dependent field the js is totally broken.
cheers