Two things prompted me to do this project:
I was the product owner of a customer relationship management (CRM) proof of concept at my day job and I needed to show what I thought the customer order form should look like.
My employer was offering cash prizes for completing coding courses and challenges. One of those courses was freeCodeCamp’s Responsive Web Design certification. If I completed the course and an additional coding challenge I would be in with the chance of winning a £300 prize.
To meet the needs of (1) demonstrating a desired interface and (2) being in with a chance of winning a £300 prize, the web form needed to meet the following criteria:
Match the MoD’s existing style scheme;
Be credible and professional so that the product team could build a system using it as a reference;
Contain at least one picture and some text;
Use at least three different CSS styles;
Have a ‘reasonably easy to use’ user experience.
Why is this important?
“So long as I retain an independent position, I shall see no officer under my command is debarred by attending to the futile drivelling of mere quill-driving from attending to his first duty, which is and always has been to train the private men under his command that they may without question beat any force opposed to them in the field.”
- The Duke of Wellington to the Secretary of State for War during the Peninsular Campaign1
Armed forces at peace and war have always needed energy. Whether in the form of hay for Wellington’s cavalry or corned beef hash for the discerning modern soldier, a military force’s ability to turn a fuel source in to activity is undeniably battle-winning.
Fortunately for Wellington, it seems he was spared any responsibility for buying, storing, moving, testing and disposing of his energy sources. For, as we know, if you buy anything and need to move it from A to B, there is at least some form of that much-maligned activity ‘paperwork’.
Some businesses are really good at this, keeping user-inputted information to a minimum and inferring from what they already have so the user never has to enter the same thing twice. Once they have that information, it’s used many times over in all of their processes.
Others struggle. Paper and Word document forms, sadly, remain common in many organisations. Once received from the user, information is then transposed/re-keyed/swivel-chaired2 in to other uses, introducing human error in an expensive and time-consuming way.
Enter the humble web form: a simple way for users to enter information in the browser, validate it and send it neatly packaged downstream for other processes to act on it.
Much is made of Internet of Things devices that do customers’ ordering for them when stocks get low or using AI to predict future demand.
Yet, for the kind of business that still emails Word document forms internally, this kind of transformation is likely to be out of reach both culturally and in terms of capital budgets.
I’m not saying such organisations are incapable of using IoT, AI and other technologies, just that cheap, incremental steps to address the low hanging fruit will likely deliver better ROI and a greater chance of success.
Web form now; IoT later.
What I did
First, I completed the freeCodeCamp Responsive Web Design certification:
This gets you up to speed on CSS flexbox and grid. I liked the projects at the end of the freeCodeCamp course, but I didn’t like so much the ‘solve this abstract problem’ style course content:
I didn’t feel I was learning so much as going through the motions. The projects at the end were good though and helped me appreciate the significance of how
grid-template-columns: works in tandem with other CSS properties on a website, for example.
I then went about putting together the web form. It went something like this:
Set up the responsive layout using Bootstrap grid.
Created the form components, labels, placeholders, default values etc.
Set up the form validation using Bootstrap’s built in validation classes.
Added the confirmation statements to display to the user once validation is passed (“Are you really, really sure this information is correct?”).
Created custom CSS styles to match the purple and grey appearance of some other MoD apps.
(I’ve had an idea of a simple web form for the armed forces’ fuel demands for some time, so I didn’t feel the need to create any mock-ups. If this were for a client, I’d have done some research on whiteboarding/wireframing UX at step 0.)
Here is the CodePen showing the live web form and its source code:
What I learned
When building a website, do mobile first. Not only did this give me more space on the VS Code/Firefox split screen, but it meant no painting myself into a corner later on. Much easier to expand a mobile layout into two columns than the other way around. Result!
Implementing mapping is fun and useful. I didn’t need to do this, but I’m a sucker for a map. Anywhere the user is required to enter or interact with geographical information I think it’s really powerful to show exactly where that point is. Especially where expensive transactions like bulk fuel deliveries are being worked on, where the cost of getting a location wrong likely exceeds cumulative API costs.
Future learning opportunities
Front-end frameworks. I’ve created a bespoke order form that the MoD could use in may other situations, but to do so would require a lot of grokking what I’ve done, separating what I’ve hard-coded in there and re-rolling it for another domain (e.g. rations, spare parts, water). A front-end framework such as React would make re-use a lot easier and consistent, plus it would allow me to hide the API key in an environment variable.
Back-end integration. The obvious next step for this would be to integrate it with a persistent store of the inputted data so that downstream processes could then act on it (buy the fuel, move it, etc.). I would like to set this up to call an API to submit on the form data to a server. This is a big and exciting area to look at for future projects!
After completing the freeCodeCamp course and creating the web form, I submitted it to my employer’s coding talent scheme and a few weeks later was surprised but delighted to receive a £300 prize for my work and the nice feedback below!
“Great entry. Nice design that works across multiple devices and really good use of the Mapbox API.”
Overall, a great learning experience that required me to develop some useful skills using a real-life organisational need as a basis. There’s a clear path here for future growth by learning the architecture of integrating web front-ends with server back-ends.
1 I found no authoritative attribution or source document for this quote. I suspect it was made up much later than the Peninsular War by a junior officer, perhaps disappointed that his new job involved a lot more ‘futile drivelling’ and ‘quill-driving’ than the adverts had led him or her to believe.
2 The swivel-charing/transposing/re-keying phenomenon is so common there are many terms for it.