XMLForm Basic File System Setup

Fields - XMLForm is a complex tool, but with some careful setup - it can be an easy tool to deploy.  This is less of a usage example, in that there aren't any forms or features demonstrated here.

The Filesystem

At the heart of any XMLForm field is the XML file itself.  Specifically, its location.  XMLForm can access any file within JPATH_ROOT, so you COULD put your form XML anywhere.  Without a centralized storage location, it becomes an Easter egg hunt (or hide-and-seek if you're not familiar with Easter).  What I suggest can be massaged into whatever you feel is best for your site.

Let's start with the file naming conventions.  Whatever you name your XML file, the language files, and template files MUST have the same base name.  If your XML file is named "gandalf.xml" - your template MUST be named "gandalf.php" AND your language files MUST be named "gandalf.ini".  This is how the plugin expects to find them.  Naming them anything but the base name of the XML file will result in failure.

In my installation here on RicheyWeb - I chose to create a "subforms" folder under JPATH_ROOT to house ALL of my XMLForm XML files, and their accompanying support files (languages, templates, etc).

  • JPATH_ROOT
    • /subforms

Simple XML Form

If a form is just a simple XML form using the plugin default HTML <table> output, no languages, no additional support files - I put the XML directly inside of the subforms folder.

  • JPATH_ROOT
    • /subforms
      • /simple.xml

Forms With Supporting Files

If a form has supporting files: languages, templates, helpers, whatever - I put that form into its own sub-folder.  Let's call this form "complex_form" and give it a language file.  While it's not necessary that the sub-folder be named the same as the XML file and supporting files - I find it's easier to navigate.

  • JPATH_ROOT
    • /complex_form/
      • complex_form.xml
      • /language/
        • /en-GB/
          • complex_form.ini

Another example with a template file (output that is NOT generated by the plugin table generator)

  • JPATH_ROOT
    • /template_form
      • template_form.xml
      • template_form.php

Beyond that, it can be as complicated as you need it to be.  I have forms with supporting classes, so I put those into a classes folder, other forms use CSS and JS that I serve from the subform folder.  Some use built-in behavior - you can call Joomla layout helpers - the sky is really the limit.

Why is this software free?

I’m ditching the freemium game and giving this software to the Joomla crowd for free. It’s a nod to “Jumla”—Swahili for “all together”—because fragmentation sucks, and I’d rather focus on innovation and paid gigs. Use it, build with it, and if you need custom work, I’m super into that.

What's The Catch?

There isn’t one! I’m all about building tools that empower the Joomla community and spark creativity. This software’s free because I’d rather see it in your hands - fueling awesome projects. If you really feel like paying something, I’d appreciate a review in the Joomla Extension Directory—your feedback means a lot!