Controlled fields not recognizing dependent field default state

WiredEscape - May 10, 2008 - 21:55
Project:Dependent fields
Version:5.x-1.3-beta
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

-D5.7
-CCK 5.x-1.7
-Dependent 5.x-1.3-beta
-multiple radio button dependent field

One dependent field option is set as default. When the new content page initially opens the controlled fields are not hidden. When another radio option is selected and then the dependent option is toggled back on, the controlled fields are then hidden.

I'm assuming that if the option used as the dependent field is set as the default selection in the content type configuration the controlled fields should be hidden when the create content page initially opens. Is this correct and there is a bug or am I doing something incorrectly?

Thanks,
Doug

#1

levyofi - May 14, 2008 - 18:57

Thank you for your question.

When the creation page is opened the fields should be hidden according to the default values you have selected. The same thing happens when you are editing a form. If a field is not hidden/shown as expected it is a bug.

Please export the cck type so I'll be able to check it.

#2

WiredEscape - May 14, 2008 - 23:22

Thank you for answering!

Please export the cck type so I'll be able to check it.

Sorry, but not sure how to export cck type. Please explain and will do. Capable but not that familiar with Drupal...

#3

levyofi - May 17, 2008 - 09:47

No problem,

Just go to "admin/content/types/export" proceed from there.

Best regards, Ofir.

#4

WiredEscape - May 17, 2008 - 22:51

Thanks Ofir,

Had to enable Content Copy in CCK section of Module configuration options for export/import options to be available.

Tested dependent fields again with a number of different combinations of field types and with and without groups. Fails to work on initial opening of page in all situations.

Here is the export.

Regards,
Doug

AttachmentSize
display_test_daf.txt4.03 KB

#5

levyofi - May 24, 2008 - 10:38

Sorry for not being around for a while.

I'm not able to import you cck type. I get the error:

warning: Cannot use a scalar value as an array in D:\xampp\htdocs\contributions\includes\form.inc on line 855.
warning: Cannot use a scalar value as an array in D:\xampp\htdocs\contributions\includes\form.inc on line 855.
warning: Cannot use a scalar value as an array in D:\xampp\htdocs\contributions\includes\form.inc on line 855.
warning: Cannot use a scalar value as an array in D:\xampp\htdocs\contributions\includes\form.inc on line 855.
An illegal choice has been detected. Please contact the site administrator.

Do you know what might be the problem?

#6

Tim Chan - June 2, 2008 - 14:11

The problem should be caused by jQuery as I've solved it by updating jQuery.js to version 1.26.

There is a discussion about updating jQuery: http://drupal.org/node/256285#comment-857924

#7

WiredEscape - June 2, 2008 - 21:06
Status:active» closed

Thanks Tim,

I can confirm that updating jQuery solved this issue for me. Went from jQuery 5.x-1.0 to 5.x-2.x-dev. Did not try latest copy of jQuery 5.x-1.0 so not sure if changes have been made there.

http://drupal.org/project/jquery_update

I was suspicious that something other than 'Dependent fields' was causing the problem when I noticed that fields within Drupal Admin pages were also experiencing show/hide problem. Had recently started to work through isolating the bug when your posting appeared.

I'll mark this issue as closed. Others, please reopen if this fix doesn't work for you.

Doug

 
 

Drupal is a registered trademark of Dries Buytaert.