7

I have a content type "Parent" and a content type "Child". When adding Parents, the user can add Childs via Inline Entity Form.

Child content types have Automatic Entity Label enabled. In that automatic label creation, I need data from within the Parent node. Obviously, there is no token for that, so I guess I somehow need to alter the form/ form state during the Parent node creation form.

How could I do that? Is there any way I can use the Parent node's data inside the title creation for the childs using IEF?

1 Answer 1

0

I found a way to get the parent node:

 $parent_node = $form_state->getFormObject()->getEntity(); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.