Level 18
I noticed now that it gets cleared even on a regular create or update form, not just on the replicate. So if I update the parent filed, all children dropdowns are being reset.
I'm using laravel nova in a project and if I do a dependent field on a dropdown and then doing a replicate and I change the value of the fields that the others depemnds on it is being cleared on the replicated record
BelongsTo::make('Title', 'brideFatherTitleFront', Title::class)
->relatableQueryUsing(function (NovaRequest $request, Builder $query) {
$query->whereFront(1);
})
->onlyOnForms()
->dependsOn(['eventType'], function (Field $field, NovaRequest $request, FormData $formData) {
if (!in_array($formData['eventType'], [1, 3, 4, 6, 9, 10])) {
$field->hide();
}
}),
This code show the dropdown. Now if I'm going to change the eventType field's value on the replicate form, instead of updating its children it will just clear the children...
Please or to participate in this conversation.