Jump to content

Can't update custom image field from API


joe_g
 Share

Recommended Posts

I've got an image field with an added custom field "caption", this caption is multilingual. I'm trying to update this field from the API, but I'm not managing.

Even though I set a language to non-default the data is saved in the default field.

For example if set the language to Spanish

$user->language = $languages->get('es');

Then I set the caption ($block is a repetear matrix)

$block->of(false);
$block->images->first->caption = 'Spanish Caption';
$block->save();

the default caption contains 'Spanish Caption' and the spanish version is empty.

Any ideas are welcome 🙂

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...