# [Usage](../../../usage.md) > [Components and standard attributes](../basics.md) > confirmationMessage

![image](img/confirmation_message_1.png)

```php
Form::make()
    ->setSchema([
        Input::make('name')
    ])
    ->setConfirmationMessage('Are you sure?')
```

---
`confirmationMessage` | `->setConfirmationMessage()`

Will force user confirmation on form submit and add the message defined in the attribute to the popup. Can also be used on buttons with actions:

```php
Button::make()
    ->setAction(function () {
        // Do some work
    })
    ->setConfirmationMessage('Are you sure?')
```

| Types               | Default |
|---------------------|---------|
| `Closure`, `string` | `null`  |

Shows a confirm popup before a `Form` submit, a `Button` action or a `Button` field refresh runs. Used on destructive or costly operations in Forms, Modals and Table row buttons. When omitted (`null`) the submit / action / refresh executes immediately.
Accepts a string message or a Closure returning the message dynamically.

### Example
Blade:
```php
{!! \KFramework\Components\Visual\Button::make('Delete')->setAction(fn() => deleteRecord())->setConfirmationMessage('Are you sure?') !!}
```
Controller:
```php
Button::make('Delete')->setAction(fn() => deleteRecord())->setConfirmationMessage('Are you sure?');
```

### Example
Blade:
```php
{!! \KFramework\Components\Visual\Button::make()->setLabel('Clear')->setUpdateOnChange(fn($fields) => [])->setConfirmationMessage('Are you sure?') !!}
```
Controller:
```php
Button::make()->setLabel('Clear')->setUpdateOnChange(fn($fields) => [])->setConfirmationMessage('Are you sure?');
```

### Interaction / tips
- Pair with `action` (../shared_attributes/action.md): confirmation runs first, action only on confirm.
- On `Form`, combines with `validate` (../shared_attributes/validate.md): validation still runs after confirm on submit.
- Keep messages short; use `hint` (../shared_attributes/hint.md) for explanatory help instead.

See also: [action](action.md), [url](url.md), [validate](validate.md), [hint](hint.md), [basics](../basics.md), [Button](../visuals/button.md).