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.
I was wondering how you target a field group with form_set_error, so the error border is correctly applied. using form_set_error('#groups][group_name',t('error'));
or form_set_error('#fieldgroups][group_name',t('error'));
did not work.
Comments
Comment #1
nils.destoop CreditAttribution: nils.destoop commentedThis is currently not possible, because the groups are objects. They are changed to the correct form element at rendering time
Comment #2
Hydra CreditAttribution: Hydra commentedWe should take care about this on a later version, thanks for reporting!
Comment #3
akhodakovskiy CreditAttribution: akhodakovskiy commentedCan you please tell if this development is anyhow previewed? One of my projects is hardly missing this functionality.
Is it possible to report an error with a definition of the group, where the field with error is situated, like 'group_name.field_name'?
Comment #4
simeI'm closing this issue as it is more than two years old, and there have been a number of drupal 7 releases since this was opened. Please do re-open if this is in error.