Hi,

I have a field collection field as "main_field_collection_field".
Then have 2 fields in that collection as "field_1" and "field_2".
None of these 3 fields have the Required option checked.

Can I use Rules to make the field_2 to be required whenever there is some/any data in field_1 on form submission?

Thanks...

Comments

TR’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I think it's wrong to be dynamically changing field settings on a node-by-node basis. Rather, what you need to do is to add *validation* to your field collection, to ensure that the entered values are consistent. This is not something that is best accomplished by Rules. Perhaps a hook_form_alter(), or perhaps a feature request in the field collection module.