Hello,
I am creating field dependencies for the fields in the user registration page of my website, so that when someone registers and specifies a characteristic in his profile then some of the following fields become invisible, as they are not needed for this kind of profile.
The problem is that for the second kind of profiles these fields are set mandatory and when I create the field dependencies to make them invisible, then when "create account" is validated, it doesn't work and I got error messages that the mandatory fields needed to be filled, even though they were invisible for this profile.

It would be great if when creating a field dependency one could specify that the dependee could become invisible "and" optional, so far one can choose only one form state not a combination.

Do you think this could be possible to implement? or do you know another module that is complementary to conditional fields and is able to add this option?

Thank you

Comments

Rebekaloz’s picture

This results in half the clicking. =) Would be nice.

peterpoe’s picture

Well, this feature already exists. If a dependent is required but the dependency is not triggered, it should not throw any validation error. So either this is a bug, or your dependencies are misconfigured (read the new documentation here: http://drupal.org/node/1704126 and check that you got everything right).
If you find that this is a bug, please provide more information about your setup, thanks.

kitikonti’s picture

Issue summary: View changes

So i have found a duplicated issue and referenced to this. I have the same problem and reading your documentation dont solve it. There is no configuration example for this in the documentation. But if i think about it there are multiple possible problems.
The bring this a step futher i will explain my configuration:

In my content type i have two custom fields. Field A and field B. Field A is a required field (configured in the field settings, not with this module). Field B is an optional field.
So now i want: If field B is filled, field A should be invisible and optional.

If i try this i get an error when saving and field A is empty and field B is filled.

dqd’s picture

Status: Active » Closed (works as designed)

regarding #2 ^^

Apart from that: Thanks 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 by 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 on this outdated version.

If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev.