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

Comments

summit’s picture

Subscirbing, greetings, Martijn

rburgundy’s picture

subscribing

aaronbauman’s picture

Can you tell me your browser / OS?
If possible, can you please enable script debugging and let me know the text of the javascript error?

aaronbauman’s picture

Status: Active » Needs review
StatusFileSize
new11.78 KB

This 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.

Bilmar’s picture

subscribing

kansaj’s picture

Tried 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