Wappler Extensibility - Writing Custom Modules and Formatters for Server Connect

@George would you mind writing a small example for the subfolders(as in Stripe) usage.

Here you go, we support maximum of two nested groups, you can even use fancy layered font awesome icons now :slight_smile:

  module: "stripe",
  action: "createCustomer",
  groupTitle: "Stripe",
  groupIcon: "fab fa-lg fa-stripe-s comp-data",
  groupTitle2: "Customers",
  groupIcon2: "fad fa-lg fa-user-tie color-yellow",
  title: "Create Customer",
  icon: [
    {prefix: "fad", iconName: "user-tie", classes: "color-yellow"},
    {
      prefix: "fas",
      iconName: "plus",
      styles: {color: "#222"},
      transform: {size: 9, x: 10, y: -8}
    },
    {
      prefix: "fas",
      iconName: "plus",
      classes: "color-green",
      transform: {size: 8, x: 10, y: -8}
    }
  ],
...
5 Likes

In the latest Wappler version, this is causing the pickers to fail.
This value in HSJON results in JSON like:

    "$_GET": [
      {
        "object"
      },
      {
        "object"
      }
    ]
  },

Instead, using this works correctly:

globalVars: {
			'$_GET' : [{name: 'name', type: 'text'}, {name: 'objectid', type: 'text'}]
		},
1 Like

Yes indeed, I will change the docs.

1 Like

Note extension builders! @JonL @mebeingken @sid

We just added support for the on demand node modules installation, so now you can add those to the Hjson as well, see:

2 Likes

Thanks george! Neat addition :slight_smile:

1 Like

Nice! :+1:

5 posts were split to a new topic: UsedModules in custom extensions aren’t auto installed

I want this in the ui of my custom server action:

How can we get this object creator in the UI, any option for that in the .hjson?

No docs, but it’s available. It is the grid control.

@sid implemented it in a custom extension. Check its source code.

Add grid display type for modules and formatters

Nooo… You are just too late!!! Would’ve saved me the last 30 min of making my own object with static options…

Thanks Jon :smiley: will see if I can get it working

Got it working @JonL - it was easier than expected for once…

Edit:
For future readers, this is my example code:

            { name: 'headers', optionName: 'headers', key: 'name', keyValue: 'value',
                        title: 'Headers', type: 'grid',defaultValue: {}, serverDataBindings: true,
                        columns: [
                            { field: 'name', caption: 'Name', size: '50%', editable: {type: 'text'} },
                            { field: 'value', caption: 'Value', size: '50%', allowJson: true, editable: {type: 'datapicker'} },
                        ],
                        newRecord: { name: '', value: ''}
            }
1 Like

@George

Is it possible to:

  1. Move the second property group to show below the first one?
  2. Make a property group wider, so the text doesn’t get cut off so much?

That is currently not possible. The option groups have max width and float next to each other depending on the available space. Will see if we can improve that in general in the future.

4 Likes

that would be awesome! so much scope for better use of space!

We just added support for the on demand node modules installation, so now you can add those to the Hjson as well,

@George at what point do the required modules get installed?

When you add a step with an action for the module to a SC flow.

2 Likes

And if you need to pass an object as a variable? Is there no such option now?

Not behind my pc now but I think I’m passing objects trough the text field without a problem, otherwise you can stringify and then parse it in the module

2 Likes

The 1st option works

Just bumping this doc as it is now updated to allow extension builders also to specify PHP modules to be specified that will be auto installed with PHP composer now available in Wappler 5.6

2 Likes