mForms demo – rural sales network

Demo of rural sales program

Sales Manger with multiple Sales Agents selling products in remote locations

Sales Agents need to know:

  1. how much commission they’ve earned at a sales event
  2. how much money they need to return to the company
  3. check that they have the right amount of money in hand

Sales Manager needs to:

  1. Have up to date information on how many products have been sold
  2. Know how much money to expect from Sales Agents at their weekly meeting



Installating openXdata on your server or desktop (All Platforms)

If you have not done so already, follow the lessons on installing pre-requisites and setting up your MySQL database.


Installing v1.3.4 on a server or desktop requires:

  1. MySQL installed with database and user set-up
  2. Apache Tomcat Web Application Manager (or knowledge of how to manually deploy Tomcat Web Applications)
  3. Knowledge of the location of the webapps directory for your Tomcat installation

The default location for the webapps directory is:

  • Windows – C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
  • Ubuntu Linux – /var/lib/tomcat6/webapps

Download web application from openXdata Download Site


Go to and select Download openXdata server 1.3.4. Then Save File As openxdata.war (you will need to change the file name from the default webapp-1.3.4.war).

By default, the name of the .war will correspond to your URL. For example, if I use openxdata.war, then my URL will be or if I use the default webapp-1.3.4.war then my URL will be

Deploy openxdata.war in Tomcat Web Application Manager


Go to the Tomcat Web Application Manager at http://localhost:8080/manager/html (if you are remote from your server, replae localhost with your server IP address).
You will be asked for the username and password that you setup when you installed Tomcat.

  1. Scroll down to the “WAR file to deploy” section
  2. Select Browse
  3. Locate the openxdata.war that you have saved
  4. Click Deploy

Note, if you are deploying to a remote server it will take a while to upload the war (~40MB) to your server.

Application does not start – this is correct


Once the .war has uploaded, the screen will refresh. You should see your new application, but it’s Running status should be listed as “false.” If it is true, you may already have a database on your system with the default openxdata settings. You can still follow the next steps to point your new openXdata instance at your new openxdata database.

Edit openXdata settings file


Next, go to the tomcat webapps folder. You will find a new directory openxdata, named because of the name of the file openxdata.war. Go into that directory, and you will fine the file On a default windows installation, you will be able to open it in Notepad. On a defaul Ubuntu Linux installation, you will be able to open it in gedit, but you will need administrative/sudo/root permissions in order to edit it. (If you don’t have administrative privileges on your server, consider installing tomcat in a non-standard directory).

In the file, you need to enter the name of database, the database user and the user’s password. Each need to be entered twice in the places shown in 1,2 and 3. For #2 replace only the openxdata with the name of your database, make sure the line still reads __localhost:3306/databasename?autoReconnect__.

Once you’ve made the changes, save the file in its original location.

Start your web application


Return to the Tomcat Web Application Manager and on the row for your web application, click Start (Click “Yes” to “Are you sure?” prompt.).

The first time you start openXdata it may take a few minutes as a new database has to be built.

All OK, Go to your new openXdata


The Tomcat Web Application Manager page should refresh

  1. Check the Message to see that it says “OK – Started application…”
  2. Your web application will now be listed as “true” under the column Running.
  3. Click the link to go to your new instance of openXdata

Default username & password


By default the username and password to openXdata are admin / admin

First time login – change admin password


Enter a new password for the admin user. If you do not you will continue to get warnings every time you log in to openXdata.

Later if you do not wish to use the default admin user, you can disable it. See section on managing users for further information.


The video shows the above process along with creating a new database and user in MySQL on Ubuntu Linux. The steps in the Tomcat Web Application Manager are the same for Windows and Linux systems.


Managing users

openXdata server overview

1 minute introduction to the basic functions of openXdata server

Study management – overview

Form management – overview

Designing forms – the basics


  • (00:00 – ~00:45) Adding your first question to a new form
  • (~00:45 – ~10:15) Question types: Text, Number, Decimal, Date, Time, Date and Time, Boolean, Single Select, Multiple Select, GPS, Picture, Audio, Video, Barcode (not yet enabled)
  • (~10:15 – ~11:15 ) Getting the Start Time and End Time of form entry.
  • (~11:15 – end) Moving questions, copy and pasting questions.

Managing Tasks and Settings

Includes instructions on how to configure Data Export task for use with EMIT (~1:08)  – only necessary with v1-2

Managing roles

Installing openXdata (Linux)

Screencast on Ubuntu Linux but much will be similar across platforms.

Assuming you have tomcat and mysql installed and running (see here).

Assuming you have downloaded openxdata.war to your local machine (Download here.)

We will do the following steps:

  1. Deploy the webapp (it won’t start first time round)
  2. Create a blank database and database user for openxdata (skip to ~1:40)
  3. Edit the configuration settings (skip to~3:45)
  4. Start the webapp (skip to ~5:40)
  5. Check everything’s running (skip to ~6:45)


If you have used the default Ubuntu tomcat installation.  To edit the file do the following:

  • Go to openxdata.war webapp directory
    • $ cd /var/lib/tomcat6/webapps/openxdata
  • Edit the properties file as root (2 options)
    • $ sudo gedit
    • $ sudo nano