vblinden
vblinden
FFilament
Created by vblinden on 3/21/2024 in #❓┊help
Translatable issue, adding random UUIDs (?)
Hi guys, I'm using the Translatable plugin, but getting strange behaviour when using the builder? It generates things like this for the language that isn't being edited, see the example below (I removed the actual data)
{
"nl": {
"7d7a65b2-93a7-4b48-a7a4-62bd8168c124": { <----------
"type": "test1",
"data": {
"icon": {
"f300653b-4fdf-41b8-a173-368d3323b651": "" <------------
},
"title": "",
"description": "",
"button": "",
"button_url": ""
}
},
"ca8355cf-a05b-4c27-9a73-99aada190ac7": { <----------
"type": "test2",
"data": {
"icon": {
"4dab0017-e8bc-466c-8f3a-f5ac0cc3118b": "" <--------
},
"title": "",
"description": "",
"button": "",
"button_url": ""
}
}
},
"en": [
{
"type": "test1",
"data": {
"icon": "",
"title": "",
"description": "",
"button": "",
"button_url": ""
}
},
{
"type": "test2",
"data": {
"icon": "",
"title": "",
"description": "",
"button": "",
"button_url": ""
}
}
]
}
{
"nl": {
"7d7a65b2-93a7-4b48-a7a4-62bd8168c124": { <----------
"type": "test1",
"data": {
"icon": {
"f300653b-4fdf-41b8-a173-368d3323b651": "" <------------
},
"title": "",
"description": "",
"button": "",
"button_url": ""
}
},
"ca8355cf-a05b-4c27-9a73-99aada190ac7": { <----------
"type": "test2",
"data": {
"icon": {
"4dab0017-e8bc-466c-8f3a-f5ac0cc3118b": "" <--------
},
"title": "",
"description": "",
"button": "",
"button_url": ""
}
}
},
"en": [
{
"type": "test1",
"data": {
"icon": "",
"title": "",
"description": "",
"button": "",
"button_url": ""
}
},
{
"type": "test2",
"data": {
"icon": "",
"title": "",
"description": "",
"button": "",
"button_url": ""
}
}
]
}
Does anyone know what I'm doing wrong?
3 replies
FFilament
Created by vblinden on 2/16/2024 in #❓┊help
Create action for relation manager be a new page
Hello everyone, I have a pretty complicated create action for a relation manager, it's too big to be in a modal or slideover. So my question was, is it possible to have it go to a separate page? I know you can put the relation managing on a different page, but then the create action is still a modal/slideover. Thanks!
3 replies
FFilament
Created by vblinden on 1/29/2024 in #❓┊help
Set default value for Builder component
What I am trying to do: Trying to prefill the Builder component. What I did: Try the ->default on the Builder::make, but it doesn't seem to work. My issue/the error: The Builder is not being prefilled. This code does not work:
Builder::make('form')
->blocks([
Block::make('values')->schema([
TextInput::make('percent')
->numeric()
->required()
->placeholder('20'),
])
])
->default([
'type' => 'values',
'data' => [
'percent' => 1,
],
])
->maxItems(1)
->blockNumbers(false)
];
Builder::make('form')
->blocks([
Block::make('values')->schema([
TextInput::make('percent')
->numeric()
->required()
->placeholder('20'),
])
])
->default([
'type' => 'values',
'data' => [
'percent' => 1,
],
])
->maxItems(1)
->blockNumbers(false)
];
7 replies