Project:Dependent
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review

Issue Summary

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

AttachmentSize
Enabled Dependent field36.94 KB
Disabled Dependent field38.9 KB

Comments

#1

Subscirbing, greetings, Martijn

#2

subscribing

#3

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?

#4

Status:active» needs review

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.

AttachmentSize
dependent-624852.patch 11.78 KB

#5

subscribing

#6

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

nobody click here