Closed (outdated)
Project:
Conditional Fields
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2014 at 09:05 UTC
Updated:
2 Mar 2024 at 15:41 UTC
Jump to comment: Most recent
Comments
Comment #1
Martin. commentedConfirming this issue. This is also present in 7.x-3.x-dev
Comment #2
tky commentedConfirmed this issue.
"Unchecked" and "Emptied" option does not work on my boolean field as a checkbox field.
Comment #3
apmsooner commentedHave you tried manually entering the on value "1" in most cases rather then using the widget defining value?
Comment #4
rooby commentedI have tried pretty much all variations I could think of and nothing worked.
Comment #5
tky commentedConfirmed robby's situation.
Comment #6
vtkachenko commentedFaced same issue. I found that state action attached to field wrapper, but not to form element.
In debug console you can see that js action runs on field wrapper - it really sets values for attribute checked.
I couldn't find suitable alter in module. Which allow to change target element.
For my project I use quick tricky script:
Comment #7
Chipie commented#6 works for me. Thank you for sharing
Comment #8
ray17n commented#6 also works for me. Thanks a lot.
Comment #9
eevensen commented#6 also works for me.
Thank you, Vitalii T. (vtkachenko).
Add a new javascript file with the code above to your theme folder:
/sites/default/all/themes/[your_theme]/js/[filename].js
Add the following to your theme's info file.
"scripts[] = js/[filename].js"
See guide: https://www.drupal.org/node/756722
Comment #10
glass.dimly commentedDidn't work with jQuery 1.10. Small change, however, fixes it:
.prop('checked', e.value);Also, I'm attaching using js behaviors:
...and I'm attaching to the form like so:
Comment #11
siavash commented#10 worked for me, thanks!
Comment #12
dqdThanks for the report and all the efforts in here. But due to inactivity in this issue for some years and because of the upcoming EOL of Drupal 7, I will close this issue on the way cleaning up the issue queue.
Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others and I will see if we can commit it before Drupal 7 EOL.