We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I use a translatable Text field in Repeater component, translatable field information is not saved to json field, instead it saves as null.
Nova field in resource:
BelongsToMany::make('Professionals', 'professionals', Professional::class)->fields(static function () { return [ Repeater::make('Role with dates', 'dates') ->repeatables([ RoleWithDates::make(), ]) ->asJson() ]; })
Repeater component code:
class RoleWithDates extends Repeatable { public function fields(NovaRequest $request): array { return [ Text::make('Role') ->nullable() ->translatable(), Date::make('Start date', 'start') ->rules('nullable', 'date') ->resolveUsing(function ($value) { return $value; }), Date::make('End date', 'end') ->rules('nullable', 'date', 'before_or_equal:today') ->resolveUsing(function ($value) { return $value; }), ]; }
If I fill information in database directly, then translatable Text field can display information without problem.
Working json example:
[{"type": "role-with-date", "fields": {"end": "2023-09-10", "role": {"en": "swimmer", "lt": "plaukikas", "pl": "", "ru": ""}, "start": "2023-09-01"}}]
As temporary solution I use KeyValue field, as it saves information in json correctly.
I'm using the following:
Laravel framework 10.25.1 Nova 4.27.13 PHP 8.2 Nova translatable 2.2.0
The text was updated successfully, but these errors were encountered:
Maybe this would help: emilianotisato/nova-tinymce#62
Sorry, something went wrong.
Same issue here.
No branches or pull requests
When I use a translatable Text field in Repeater component, translatable field information is not saved to json field, instead it saves as null.
Nova field in resource:
Repeater component code:
If I fill information in database directly, then translatable Text field can display information without problem.
Working json example:
[{"type": "role-with-date", "fields": {"end": "2023-09-10", "role": {"en": "swimmer", "lt": "plaukikas", "pl": "", "ru": ""}, "start": "2023-09-01"}}]
As temporary solution I use KeyValue field, as it saves information in json correctly.
I'm using the following:
Laravel framework 10.25.1
Nova 4.27.13
PHP 8.2
Nova translatable 2.2.0
The text was updated successfully, but these errors were encountered: