kirschbaum-development / nova-inline-relationship

A package to present relationships as inline properties in Nova.
MIT License
198 stars 83 forks source link

readonly parameter not honored #43

Open martianatwork opened 4 years ago

martianatwork commented 4 years ago

If a child has a readonly parameter set, the create & update form will allow the field to be editable

brandonferens commented 4 years ago

@martianatwork Thanks for the bug. Which relationships are you using when you see this happen?

nemrutco commented 4 years ago

i end up with same issue,

i use as:

 BelongsTo::make(__('Profile'), 'profile', Profile::class)
                ->inline()
                ->requireChild()
                ->hideFromIndex(),

does not apply readonly fields in profile resource

class Profile extends Resource
{
...
public function fields(Request $request)
{
    return [
        ID::make()->sortable()->hideFromIndex(),

        Text::make(__('ID Number'), 'id_number')
            ->rules('required')->readonly(),
    ];
}
...
ikramooe commented 2 years ago

any solution to this problem ?