I have a Field Collection item which consist of a drop down, a text box and a link field. After the user submits a form I create a node were this field collection item is included. Before I save it, I populate some fields.
I managed to set the 'Url' in the link field(part of field collection item) by using:
$field_collection_item2->field_url->setValue($base_url . '/form/email-project-completion-survey');
Which works fine. Now I'm trying to set the 'Link text' but I can't make it work.
Thank you in advance