Update link field plugin via PHP?

Hey everyone,

i am trying to update a value in a field with link field plugin via the update()-function. As this seems to work for the value itself i run into the problem that the type of my field will be reset to the default value of “URL”.

Is there any way to keep all the set values of the fields and just change the link?

Thanks in advance!

I assume the field stores it values in yaml format? So you would have to get the array and only update the key you want to update. Then store the yaml encoded array again.

It helps us to answer more quickly if you always provide a link to third party stuff…

Thanks a lot, i will try that. And of course there will be a link next time :slight_smile:

If you don’t get it to work, let us know.