SetAttribute on Multiple Select through API

Permalink
Hey everyone,

I want to assign uIDs to pages so I can have multiple users linked to a certain page. I've created a multiple select page attribute called 'team' to do this. Using this code:

$page->setAttribute('team', array(1, 2, 3, 4));


Works great, but it won't add/create a new value for my multiple select options if it's passed a uID that's not already a select option. For example if 1,2,3 are already known values it will assign them, but it won't create and assign '4' if it didn't exist yet.

Is there a workaround or possibly a better recommended way to go about this? I may just end up pre-populating values of like 1-1000 or so to avoid running into problems.

Thanks for any recommendations!

View Replies: