This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

sercanvirlan
sercanvirlan

Hello,

I have multiple select object, which produces array for submit. But there is a protection on the model.php (https://github.com/octoberrain/database/blob/master/Model.php#L984) gives "Unexpected type of array, should attribute "relationship" be jsonable?" (The relationship field can be have multiple values.) How can handle this error.

I need an emergency solution.

Thanks.

Vijay Wilson
Vijay Wilson

Hello, May I know how did you created a multi select form field object in fields.yaml.

daftspunky
daftspunky

@sercanvirlan should define the relationship as jsonable

protected $jsonable = ['relationship'];

@Vijay you can use the repeater form field or partial form field for the backend.

Vijay Wilson
Vijay Wilson

Ive used protected $jsonable = ['relationship']; Can you share me the code I've tried a lot. when I use repeater it shows me some error

Last updated

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.