Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
TR CreditAttribution: TR commentedI 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.