I don’t understand
Shouldn’t it be in data?
You it may be data
Like example shows
I’ve wouldn’t say that I use this quite a lot ![]()
Ok, so you’re not sure about it being called body
No not 100%
Yea I think it should be data
const formData = new FormData();
const data = {
…stuff,
relation: { id: relationId}
}
formData.append('data', JSON.stringify( data )
if (!['submit', 'file'].includes(type)) {
data[name] = hasRelation(type)? relation: { id: value}: value;
}
That’s overkill
when you do relation you should provide id
Yeah, it’s the id
Are you sure about it being called relation?
Because I have seen it being called connect
And also how does it tell if it something specific?
It’s name of relation
It’s not really a relation
Basically i am using a component in the content type
It’s not a function name