Conditional Fields should ignore altogether the submitted values of an untriggered dependent field and completely skip validation for that field.

Original issue:

Conditional Fields doesn't work with a required select list or node reference field!

My Case
--------
Created a product list field (taxonomy term)
Created a serial number field with regex validation

Created a condition (using conditional field module) that if a user picks product from the taxonomy list, then it hides the serial number, but still asks for serial number.

Result: The module does hide the serial number filed but it doesn't override the requirement validation of the serial number field hence I can't save the page.

I tried it with webfrom & webform conditionla field works great (But I need to play with views to export the field values which web form doesn't support now, so that module don't work for me.) It would be so great if some one could help me out with some tip.

Thanks in advance.

Comments

Bright Web Design’s picture

Can anybody give me a hint on this?
I hope this module is active!

visabhishek’s picture

Title: Conditional Fields doesn't work with a required select list! » Conditional Fields doesn't work with a select list!

I am facing similar problem.

blackclover’s picture

subscribe

Bright Web Design’s picture

I think someone should really take care of this great module.

Draven_Caine’s picture

This is an issue with required fields not fieldgroups. remove the required part and select lists work.

In all words, conditional fields doesn't turn of the required part of a field if the field is hidden making the node un-savable.

Bright Web Design’s picture

So how about making a field required using conditional field?

I turned off the core field require option & turned on the conditional field require option.
But conditional field doesn't make the field as required even though it mark as required "*".
users can save the node even if the field is empty.
I used regex to validate like this ^\S+$ to check the empty field but it doesn't seem to work on field validation module.

Any suggestions?

garphy’s picture

I turned off the core field require option & turned on the conditional field require option.
But conditional field doesn't make the field as required even though it mark as required "*".
users can save the node even if the field is empty.

Hey Guys,

Same exact issue here... Any advance on that topic ?

jason.fisher’s picture

In D6, we would use the http://drupal.org/project/required_for_pub module for an alternate way of marking a field as 'required' with conditionals. I do not see a D7 port yet, though.

peterpoe’s picture

Title: Conditional Fields doesn't work with a select list! » Skip validation and ignore submitted values of untriggered dependent fields
Priority: Critical » Normal

Assuming that "regex validation" means that you are using the Field validation module with a regular expression rule: currently, Conditional Fields does ensure that the requirement of a dependent field is not enforced when a dependency is not triggered, but it doesn't skip the whole validation process, since the dependent field values are submitted in any case (that is, even if the field was hidden).
Instead, Conditional Fields should ignore altogether the submitted values of an untriggered dependent field and completely skip validation for that field. I'm changing the title and description of the issue to reflect this.

#6: The "Required" Form state option is purely presentational, it doesn't alter the validation of the form. I have just committed a change to the description of the option that clarifies this.

peterpoe’s picture

Status: Active » Fixed

FIxed in dev. Check it out!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Changing scope of the issue