crud icon indicating copy to clipboard operation
crud copied to clipboard

The value of Button in form is being overwritten

Open ajaxray opened this issue 2 years ago • 1 comments

I am trying to add a submit button at the end of the form.

public function fields(): array
    {
        return [
            // other fields ...
            Button::make($this::updateButtonLabel())
                ->class('btn btn-primary')->method('update')
        ];
    }

The button is being added and seems to be working.

But the problem is, the button value is being overwritten and becoming model[Update ResourceName].

CleanShot 2021-12-19 at 15 58 26@2x

How can I avoid this and keep the button name as is? Can anyone help?

ajaxray avatar Dec 19 '21 09:12 ajaxray