Getting started with UX Forms

This tutorial will take you through, step by step, how to create and run your first form on UX Forms.

You will need:

Set up from a project template

Create a directory for your new form

mkdir helloforms && cd "$_"

Download UX Forms’ starter project

curl https://bitbucket.org/uxforms/uxforms-starter-formdefinition/get/master.zip --output master.zip \
&& unzip master.zip \
&& cp -Rp uxforms-uxforms-starter-formdefinition-*/* . \
&& rm -rf uxforms-uxforms-starter-formdefinition-*/ \
&& rm master.zip

Give your form a name

This is the url path on which the form will be accessed. Note: form names have to be unique so pick something that’s unlikely to be already taken. Open build.sbt and replace “changeme” on the following line with the name of your form

name := "changeme" // TODO: Change this to be the path on which your form will be deployed

Build your form

Run sbt

sbt

Sbt will download all the dependencies it needs to build your form, then you should see a prompt like this:

[changeme] $

Run tests

All the usual sbt commands are available so let’s run the form’s tests to make sure it will work:

[changeme] $ test

You’ll see something like this in the console:

[info] Run completed in 9 seconds, 72 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0 (1)
[info] No tests were executed.
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2 (2)

Build your form

Forms are deployed by uploading a jar file of your form, so let’s create that now:

[changeme] $ osgiBundle

Your form’s jar will now be present in your project’s target directory: target/scala­-2.11/changeme_2.11­-0.1­-SNAPSHOT.jar

Deploy your form with UX Forms Dashboard

Log in to UX Forms’ dashboard

https://dashboard.uxforms.com (or, if you are on UX Forms' free trial, https://dashboard.aiken.uxforms.com)

found in the navigation menu on the left of the screen

Screenshot of dashboard highlighting ‘Forms and libraries’ menu item

Upload the jar file you created earlier

Screenshot of dashboard highlighting where to upload a form

You will see a green bar at the top of the screen telling you that your form was successfully deployed. Your first form is now live on UX Forms.

Open https://forms.uxforms.com/yourNewFormName (or https://forms.aiken.uxforms.com/yourNewFormName if you are on UX Forms' free trial) in your web browser to see it in action.