Skip to content
New issue

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

The value of Button in form is being overwritten #59

Open
ajaxray opened this issue Dec 19, 2021 · 1 comment
Open

The value of Button in form is being overwritten #59

ajaxray opened this issue Dec 19, 2021 · 1 comment

Comments

@ajaxray
Copy link

ajaxray commented Dec 19, 2021

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?

@gioacchinopoletto
Copy link

gioacchinopoletto commented Nov 3, 2022

You can add a language string like:

Update ResourceName: new string

for example:

"Update ResourceName": "Update record"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants