Smart Action Form Fields added dynamically using load hooks should have the configured widget

Feature(s) impacted

Smart Actions with dynamically added load hooks that use widgets.

Observed behavior

If a smart action form’s fields are loaded with a load hook, then the widget is ignored.

Expected behavior

Smart action form fields that are loaded through a load hook should take into account the widget.

Example code

This example code creates a field and adds it to the form, but it defaults to using the usual string input. I tried also with the date picker widget and got same result for a type: “Date”

{
  name: "Smart Action",
  download: true,
  fields: [],
  hooks: {
    load: ({ fields, request }) => {
      const field: Liana.SmartActionLoadHookField = {
        field: `custom field name`,
        type: "String",
        position: 0,
        widget: "text area",
        value: `custom value`,
      };
      fields.push(field);

      return fields;
    },
    change: {},
  },
}

Context

  • Project name: Bridgement
  • Team name: Bridgement
  • Environment name: Production
  • Agent type & version: forest-express-sequelize: v8.4.10

Hi @SoftwareBridgementKe :wave:

Unfortunately, in the case of dynamic fields in Smart Action Form, the property widget is ignored… :frowning_face:.
I’ll push your request to our product team :memo:

1 Like