enter image description here

I am looking for a way to transfer the location of the field created programmatically inside a div created by field_group module.

Can anyone help me to achieve this?

Thank you.

  • 1
    Go to manage manage form display and move it below the group parent – No Sssweat Mar 16 '18 at 9:47
  • @NoSssweat If you create the field in an alter_hook is this possible? – Adrian Cid Almaguer Mar 16 '18 at 14:48
  • @AdrianCidAlmaguer yea, as long as you do $form['parent_name']['field_name'] – No Sssweat Mar 17 '18 at 2:01
  • @NoSssweat this is new for me, I will test it tomorrow. – Adrian Cid Almaguer Mar 17 '18 at 2:28
  • I am not able to target the machine name of the field_group – Bernard Brillo Mar 19 '18 at 2:34

I was able to achieve this using javascript:


But I am still looking for a way to do it under form_alter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.