Hi @eiriksk
Thanks for the code, bu i don’t quite understand what the issue is.
Can you please clarify the question?
What does and doesn’t work?
Where is your code found?
Is your code within an action?
Why is it broken into 2 parts which would cause PHP errors?
Why have you copied / pasted source code from the select field type?
Thanks
E