Enquiry of example of custom tag and it's limitations

Can someone provide a step-ny-step process of how to create a custom tag and expand on their advantages and limitations? A link to an example is a great plus.

What do you mean by a “custom tag”? Do you mean a custom XML element for XML Screens/Forms?

1 Like

Yes. Suppose i have a UI construct That i use a lot. Or another example, i want a dropdown that acts like a hidden form and applies a transition on entry selection. Suppose i want to add a “depends-on” child for a drop-down.

how do i approach This kind of problem. Am I even asking for a custom tag that makes sense when thinking about moqui screens?

Finally, and this may be loosely linked, is it a good idea to use this kind of UI tag to link client and server UI together So that they can interact?

1 Like

@Mohammad_Al_Hajj If I understand what you’re talking about, I believe that you are talking about the XML elements to create moqui screens.

If so, they are mostly if not all defined in this directory: https://github.com/moqui/moqui-runtime/tree/master/template/screen-macro

For example a common XML Element is a link. You can find the definition of a link for different render modes in the corresponding DefaultScreenMacros.render-mode.ftl. For example here’s a list of html, vuet, and qvt:

  • Link Element definition: html
  • Link Element definition: vuet
  • Link Element definition: qvt

Hope this helps :slight_smile:

Yes, custom XML elements and such are fairly easy to add… for a doc reference see:


The main thing you need to do is use a different FTL macros file that includes the OOTB ones and the custom ones you add. The OOTB example of this uses this template file:

This example uses the Moqui Conf XML option to specify a template, the other option is to specify the macro files in a XML Screen def. In this case it is referenced in the MoquiDevConf.xml file:

1 Like