How To

Use this category to ask any questions or guidance about the custom modules and formatters for Wappler.

About the How To category

Use this category to ask any questions or guidance about the custom modules and formatters for Wappler.

Custom Module Not Found

Wonder if somebody could help me. I am trying to use the Base64 to image custom module. It will work fine on my local docker test but on the Digital Ocean live site it will not work. I am using Trafef…

Get Header AUTHORIZATION value

You can edit the .htaccess, Wappler will only update the part bewteen ## Wappler routing and ## End Wappler routing and not touch any additional rules you add.

Keep large JSON in-memory accessible for every request

Hi, I want to load a large JSON file (all cities and states) and keep it in-memory, accessible for every request. Kind of like $_CUSTOM.cities. Loading the file at every request is inefficient Any t…

Issue a requestUpdate() for a specific component

First you need to get the instance of the component. On the component you then can call the $update method like: const component = dmx.app.find('mycomponent'); if (component) { // did we find the co…

Nested data scheme in Wappler Extensions

Here’s a sample: dataScheme: [ { name: 'results', type: 'array', sub: [ { name: 'location', type: 'object', s…

SC extensibility: create global

@George is it possible to create a new custom global UI module as part of the extensibility? Is this available via hjson?

Custom module - dropdown: populate a global variable?

Hello, I’m trying to retrieve all the Oauth2 providers declared in a project globals to put them as inputs in a dropdown in the GUI of a custom module. Right now I am writing this manually: { name:…

Help with config issue ... installing html2pdf and no longer building

Hi @sid dhant, For info, All good now up+running. thanks for your help and the component. If you’re ever looking for a great job, ping me. John@orthobridge

Paged custom query

Hi @patrick, I’m trying to extend the paged query. Can you let me know what is the structure of options.sql object so I can reuse as much code as possible from the standard? Unless I’m better off e…

Help with custom module output

Just when i thought i had got my head around such things. Written several custom formatters and had no issues Now on my first tries of custom modules and having on issue regarding returned values …

AC component props not updating on time to render component

The update method has indeed 2 arguments, previous it only had 1. update: function(oldProps, changed) { ... } In the update function you can access the properties of the component with this.props. T…

How to get a database connection inside a Wappler extension? (NodeJS)

It is the database connection name. You can create an additional input in the extension HSJON to write the DB connection name used in Wappler.

Custom block to insert steps inside

Actually now we have a new ‘group’ action that will allow you to group together multiple action steps. It is also useful to created nested data output. Just make sure you give it a name.

JSON output only in console, not in browser

Hi, Sorry about that, I’ve just realized I gave you an incomplete solution… So, you’re returning something in the function processFile(), that’s good. However, where your code is processFile(conten…

Read file in custom extension

Thanks guys for tips. I figured out that it needs to be ‘/opt/node_app//public/xml/full_tst_1item.xml’ because it is Docker (what I forgot to mention)

Custom Module - Upload Image to CloudFlare - Works need help with file path

You forgot this: fs.createReadStream(path) Where: data.append(‘file’, path); Should be: data.append(‘file’, fs.createReadStream(path));

Can a Wappler extension execute actions from the Library?

Hi, Could a server connect custom module execute actions in the Library of the current project? Context: Queue module, where you would select which action you want to execute

How to pass Redis connection to module?

Hello, Is Redis connection information available on globals? I want to pass that to a server connect extension/module

Sending response to client side

Found the error. My hjson file was missing the name property { name: 'name', optionName: 'name', title: 'Name<sup style="color:red">*</sup>', type: 'text', required: true, defaultValue: ''},

Output field in custom module defaultValue not working

Well defaultValue just indicates what is the value that when entered the whole option should be omitted. If you want to make the checkbox checked initially add: initValue: true, defaultValue: false

NodeJS Custom Formatters - parameters not as expected

The first argument in the formatter function is always the value it is attached to, the remaining parameters are the ones that you will add in the interface. When you only need one parameter then you …

Steps templates

Yes you can use indeed the steps template in your custom module. Just add all the predefined steps there like: { groupTitle : 'S3 Connector', groupIcon : 'fas fa-lg fa-cloud-upload comp-files…

Custom middleware(routing) to discriminate URL parameters

======== TEMPLATE BUG FORM ======== Wappler Version : 3.2.1 Operating System : Mac Project: NodeJS, MySql, Docker. Expected behavior What do you think should happen? When a user visits the URL …

Add grid display type for modules and formatters

Right now the number of parameter values a formatter will accept is fixed. This could be improved by allowing the enum type as I am just interested in the value of them. I have a custom formatter tha…

Select spesific records out of database - in range of the count.. does that even make sense

I won’t do it like that - returning 1000 records and then load them using data view. Better set up a paged query, set the limit to 13: Then on the page, use the paged query as a source for the rep…

Custom module PHP properties and methods

@patrick Do you have php versions for these two posts?

Call a function in NodeJS

I am trying to call a custom function using NodeJS Created the custom function in a file ‘shortuuid.js’ in folders: extensions > server_connect > modules I then created a function in API: in the …

Server Data Bindings do not evaluate to their values when using Custom Modules

I think I found it George: Testing now. EDIT: All good…just had to use the parseRequired as Patrick documented in the above post. This just opens up a whole world of fun!

Custom formatters multiple input fields

When creating the custom module, I need something like the screenshot. Can you share an example for this? so I need to be able to send more than one variable.

Need some help with custom code

I have a script in old MySql to exactly place a pointer on a google maps position for real estate. It needs to be converted to work with a link from a Wappler project. I managed to get all but one er…

Extensions UI fields show and hide

This is improved in Wappler 3.4.2