Is it possible to show a popup when we execute a smart action

We have a few smart actions that triggers important workflows in the company. Before the action executes we’ll like to show a popup explaining what happens. Similar to what happens on the approval.

If this is not possible curious if there are any workarounds, as this would be something key for us

Hello @Zero,

For the moment, it is possible to display a confirmation popup when triggering a custom action, if you define your custom action with the property confirmation: true.

In this case, Forest Admin will display a message: Are you sure you want to trigger the XXX action in a confirmation popup.

You also can display a form that will ask the user for confirmation, as described in the docs. I guess that you can define a boolean field with a description that will display some more details to your user.

I noticed that pop up, but we’re not able to edit the text of it. Is there any other option that can be done?

No, for the moment, the text in this popup is generated from the action’s name and that’s it.

I don’t see any other possibility than the 2 explained in my previous answer.

I’m adding your suggestion to our list of feature requests.

Hello, any news on this feature or a guide on how to add a confirmation in a smart action ?

Hello,

We did not add this possibility on smart actions for the moment.

Is there a plan to add it in the future ?

This subject is on our radar but has not been prioritized for the short term.

Hello @GuillaumeGautreau,
I don’t see the property confirmation for the custom action.
I have only the following fields:

export interface SmartActionField {
  field: string,
  description?: string,
  type: FieldType,
  isRequired?: boolean,
  isReadOnly?: boolean,
  enums?: FieldEnumsType,
  defaultValue?: any,
  reference?: string,
  hook?: string,
  widget?: string;
}

Could you help me please?

Hello @Jules_Camille_Ziriga

Please avoid resurrecting old threads, as the initial poster will get email notifications.

This is configured from the UI (see screenshot “Ask for confirmation before executing”)

1 Like

I do this :

const InfoField = (content) => ({
  field: "ℹ️ Info ⚠️",
  isReadOnly: true,
  type: "String",
  widget: "text area",
  defaultValue: content,
});
[
   {
      name: "❌ my smart action",
      endpoint: "/forest/table/actions/my-smart-action",
      type: "bulk",
      fields: [InfoField(`your content`)],
    }
];

Thanks for sharing the tip