Skip to content

Saving future/pending entries to field in custom plugin #9831

Discussion options

You must be logged in to vote

Your setFieldValue() syntax is wrong. The first argument should be the field handle, and the second argument should be the array of IDs:

$subscription->setFieldValue('subVideos', $videos);

You would only pass an array of field handle/value mappings if you were calling setFieldValues() (plural) instead:

$subscription->setFieldValues([
    'subVideos' => $videos,
    // ...
]);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jordancraftltd
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants