Translatable repeater in relation manager

Hello! I need to make translatable repeater fields in relation manager. Is it possible? Because filament saves translations of repeater fields from resource edit page, but doesnt save from relation manager.
2 Replies
tlegenbayangali
tlegenbayangaliOP15mo ago
Fields schema:
Forms\Components\Tabs\Tab::make(__('Exterior'))
->schema([
Forms\Components\Repeater::make('exterior_options')
->label(__('Exterior options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Interior'))
->schema([
Forms\Components\Repeater::make('interior_options')
->label(__('Interior options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Comfort'))
->schema([
Forms\Components\Repeater::make('comfort_options')
->label(__('Comfort options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Security'))
->schema([
Forms\Components\Repeater::make('security_options')
->label(__('Security options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),
Forms\Components\Tabs\Tab::make(__('Exterior'))
->schema([
Forms\Components\Repeater::make('exterior_options')
->label(__('Exterior options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Interior'))
->schema([
Forms\Components\Repeater::make('interior_options')
->label(__('Interior options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Comfort'))
->schema([
Forms\Components\Repeater::make('comfort_options')
->label(__('Comfort options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),

Forms\Components\Tabs\Tab::make(__('Security'))
->schema([
Forms\Components\Repeater::make('security_options')
->label(__('Security options'))
->defaultItems(0)
->schema([
Forms\Components\TextInput::make('option')
->required()
->label(__('Option'))
]),
]),
Equipment.php
public $translatable = [
'exterior_options',
'interior_options',
'comfort_options',
'security_options',
];
protected $casts = [
'exterior_options' => 'array',
'interior_options' => 'array',
'comfort_options' => 'array',
'security_options' => 'array',
];
public $translatable = [
'exterior_options',
'interior_options',
'comfort_options',
'security_options',
];
protected $casts = [
'exterior_options' => 'array',
'interior_options' => 'array',
'comfort_options' => 'array',
'security_options' => 'array',
];
Haydra
Haydra7mo ago
hi, did you manage to solve it ?
Want results from more Discord servers?
Add your server