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 am moving some form fields into the "Publishing Options" vertical tab group using hook_form_FORM_ID_alter(). This movement, however, means that the elements are not found by Conditional Fields after_build callback and as a result the dependency is not applied.
My code in hook_form_FORM_ID_alter looks something like this:
function example_form_node_form_alter(&$form, &$form_state){
$form['options']['field_field_name'] = $form['field_field_name'];
unset($form['field_field_name']);
}
Comments
Comment #1
dqdThanks for the report and all the efforts in here. But due to inactivity in this issue for years and because of the upcoming EOL of Drupal 7, I will close this issue on th way 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.