My conditional fields are not visible after node is submitted. What I did to produce this is have a drop down with two options 'Image & Video' and two of the fields respectably that would only show when a selection is made from dropdown.

One node add/edit this field condition works but once the node is submitted, neither of the fields are showing. I checked display settings and the only way to have them show is to remove the field condition. So this is a problem with this module.

Comments

teh_catt’s picture

I have same problem. subscribing

peterpoe’s picture

Could you try with the latest dev? This problem should have been fixed yesterday while addressing other bug reports.

SuperStes’s picture

I also have the same problem, eventhough I am working with the 7.x-3.x-dev version.

I have a checkbox field that, when checked, makes two extra fields available to be filled in. It works perfectly on the add/edit pages, but the fields are completely absent when the node is viewed, eventhough they are marked to be displayed in the "manage display" tab of the content type.

Hope someone can fix this - real fan of conditional fields!

LiloLilo’s picture

+1 I have the very same problem. I have a checkbox/radio with 2 options, one controls a couple of text fields via conditional fields. These fields are not shown in node view tab after node saving even when enabled. Does the dev version fix this?

EDIT: It seems that the ratio button selection is not retained after saving the node, returning on the Edit tab after saving the ratio buttons shows no one of the options is selected, so this would be the cause why fields are not showing into the view tab.

How to reproduce:

Create a checkbox/radio button widget with 2 options. Second option does control a textfield
Save a node selecting the seconnd radio button option and filling the textbox
On edit node type, radio button does not shows any option selected

Anonymous’s picture

I have this problem when the third hide option on the node view tab is selected. If I deselect that option (Hide dependent when dependee is not viewable by the user and when the dependency is not triggered), then all fields are rendered as they should be. Unfortunately, I need that option to be selected.

peterpoe’s picture

Your problem may depend on a combination of settings:
(I'm referring to the latest dev as always – please update to see if the problem persists)

The relevant settings are in the "node view settings" tab in the dependency edit page:

- Hide the dependent if the dependency is not triggered (on by default)
This is self-explanatory, though note that if a dependent is "Hidden" when a dependee has a certain value, it will be visible on node view only when it is hidden on node edit, since the dependency is triggered!

- Hide the dependent if the dependee is not viewable by the user (on by default)
When a user views a node, a dependee field may be hidden for a number of reasons. The most common is that it is set as "" in the "Manage display" tab of the content type. Another common case, is that you have enabled a module that controls access to fields, like the Field Permissions module, and the user viewing the node does not have view access on the dependent field. So if you are puzzled about the reason why your dependee fields are disappearing, check your site setup, because Conditional Fields will never hide a dependee field! If this setting in on, though, CF will hide a dependent if its dependee is not viewable.

- Hide the dependent if the dependee is not viewable by the user and the dependency is not triggered (off by default)
This option works like the option above, but an additional check is done against the dependency conditions: if they are satisfied, the dependent is hidden, if not, it is shown. Note that this option has no effect if the option above is enabled.

I understand that these settings are a bit confusing – and not all combinations of the 3 probably work as expected – but by trial and error you should be able to obtain the desired effect.

carlovdb’s picture

I also have this issue.

When I add/edit a node, everything works just fine. The field dependancies works just fine!

I have added two dependancies.
State
. |_ Type
...... |_ Number

When state is chosen, you can select a type and then a number of the chosen type.

While adding or editing a content type, everything works fine.
When I view at the node, there is no state, no type and no number.

I installed the latest dev version (5 may 2012).

* EDIT *

I have also another dependancie and this one is shown correct.
So it seems that on the node-view, it only shows 1 dependancie.

And, if I look it up with devel module. It seems that the data is not saved.

guillaumev’s picture

I thought I had the same issue, but in the end it's not a bug, it's a logic issue.

I had conditional fields configured to hide certain fields based on one field's value. So a condition like hide field1 if checkbox is checked. With a configuration like that, and with "Hide the dependent if the dependency is not triggered" checked, field1 will be hidden when the dependency is NOT triggered, so when you actually want field1 to be shown.

What you have to do if you are in a configuration like mine is to turn the condition around, and use a condition that says SHOW field1 if checkbox is NOT checked. That way, with the checkbox "Hide the dependent if the dependency is not triggered" checked, field1 will be hidden when the dependency is not triggered, that is when the checkbox is checked, which is what you want...

It took me some time to figure this out, so if it can help someone...

jeff h’s picture

I can vouch for what guillaumev said in #8 — my data wasn't saving, but in my case it was due to configuration error rather than a module bug. I guess the design of the module interface could be improved but I am unsure how... it isn't trivial to improve such things.

jeff h’s picture

On reflection — confusing configuration screen or not — any combination of configuration options that allows a user to see fields in a form, enter data into them, and hit save THEN for that content to be discarded and NOT actually saved... that's a bug.

I have a fairly simple case of 6 multiselect checkboxes (in one field), selecting one of which needs to hide several other fields. This works perfectly except that when the checkbox in question is NOT checked, and the other fields are NOT hidden, anything entered into them is not saved.

For me, unchecking "Hide the dependent if the dependency is not triggered" made no difference.

The one thing that did work for me was to reverse the logic, so instead of hiding the field when a checkbox was ticked, I show the field if the checkbox is NOT ticked. This had no visible effect on the form as presented (it is correct visually in both cases) but the new way made the form data save properly.

As stated, I reckon it's a bug in 7.x-3.x-dev from 5 May 2012.

inky@inky3d.com’s picture

I don't suppose anyone knows of the progress here?

This module is core to some of my structures and would love to see it working 100% in D7.
With this current bug, it's of little use, although some elements of it have been working fine.

yannickoo’s picture

I had the same problem but after unticking the checkbox "Hide the dependent if the dependee is not viewable by the user" it works fine!

peterpoe’s picture

Status: Active » Closed (works as designed)

guillaumev in #8 is right, this is not a bug, it's by design.

I copy/paste what I wrote in a similar issue:
"It's a bit counter-intuitive, but this is how it works: when a dependency is triggered if a field is invisible, of course it's not triggered if the field is visible. When a dependency is not triggered, the dependent field is completely ignored on form submission, and the values are not saved (otherwise, we would have to validate them, and possibly trigger validation errors on untriggered dependents, or even worse, save invalid values!)."

#10: I disagree with this being a bug. It's "only" a defect in documentation and user interface (as wrote jeff h in #9). I have included a note about this in the new – behold! :) – documentation for Drupal 7 just yesterday. And certainly we should investigate other ways to avoid user confusion in these cases.

jwjoshuawalker’s picture

Status: Closed (works as designed) » Active

I cannot get conditional fields to save the 'dependent' field values under any circumstances. As of latest CF update, they aren't being hidden until triggered either. (I am very well aware of the possible appropriate settings, long time user of Conditional Fields both D6 & D7).

I have other sites w/ D7 Conditional Fields working, so there must be a conflict going on.

The site does use Hierarchical select, known issue here: http://drupal.org/node/1325538, but even on other forms where no HS is present, CF isn't working.

One of the forms w/ broken CF gives this:
Notice: Undefined index: #id in drupal_process_states() (line 4549 of .../includes/common.inc).

I will post more details like enabled modules later, I just wanted to revive this thread asap.

justkristin’s picture

Drastik -

Sounds more like the problem we are having here: http://drupal.org/node/1542706

Data is not being saved.

Kristin

jwjoshuawalker’s picture

Status: Active » Closed (duplicate)

@justkristin

Yes it's a duplicate then. I found this thread first when searching. The OP of this thread just worded it funny "not visible on node view" :)

Duplicate of: http://drupal.org/node/1542706

marksmith’s picture

Issue summary: View changes

Solution #12 works for me only IF for 'Values input mode' I select the option 'Insert value from widget...'. It does not work with 'Set of values / Any of these values'. For this I needed to create two separate conditions (for the two cases I wanted to activate the dependency on) and set 'Interaction with other dependencies' to OR.

tisteegz’s picture

I am not sure this is a duplicate of http://drupal.org/node/1542706 as that issue is about the content not actually being saved however my fields are definitely set but just not being displayed on the front end.
When I deleted the conditions then the fields displayed with values and without me having to re-save the node. No solution seems to be working for all of my fields, a few changes have gotten a few of the fields to display but some are still not showing.

Drupal 7.59
Conditional Fields 7.x-3.0-alpha2