How to Create a Template Builder?


Recommended Posts

I work in the transport industry and every day, we have to write plans for replacement buses.

We send these plans to a bus company.

Sometimes there may be three or four buses, sometimes there may be 20.

I was thinking whether there could be some sort of template that I can type in a few details and it sort of write the plan for me?

This may be something as simple as a HTML page but I have no idea where to start (and don't know HTML).

 

For example, this is what I would write:

0B00 cancelled:
1 x FS coach 23:00 Station 1 calling at all stations to Station 2, then set down as required to Station 4
1 x FS coach 23:35 Station 2 calling at all stations to Station 3, then set down as required to Station 4
1 x FS coach 00:05 Station 3 calling at all stations to Station 4

The BOLD ITALIC parts are all the bits that need changing depending on what bus plan I am creating but wanted to save time (and help with consistency) and have everything else pre-set as a template.
It would be great if there was a box that I can start typing in the different names of the stations and as I type, it start making suggestions (an extension to this is also searchable by a special 3 letter code that each station has).

Is a simple HTML page with a box that gets filled with the details the way forward?  Or is there something else I should look at (like Excel or Word?).  I did think about Access but I don't know many people who use that any more and all I remember is that you can make pretty buttons, although as it's a database sort of thing, then it could be perfect for this.

This must be able to be run locally - nothing online (again, for now - we use Sharepoint at work but think something simple for now should fit the bill).

I can't get too deep into this as the timetable changes twice a year so there needs to be some sort of manual input for timings instead of a database to select specifics (for now).

Thanks for any pointers.

Link to comment
https://www.neowin.net/forum/topic/1427814-how-to-create-a-template-builder/
Share on other sites

So far, I have this:

<!DOCTYPE html>
<html>
<body>

<h1>Bus Template Planner</h1>

<form action="/action_page.php">
  <label for="thc">Train Headcode:</label>
  <input type="text" id="thc" name="thc">
  
  <label for="activity">is:</label>
  <select name="activity" id="activity">
    <option value="cancelled">cancelled</option>
    <option value="terminating">terminating at</option>
    <option value="starting">starting at</option>
  </select>

  <input type="text" id="lname" name="lname"><br><br>
  
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit">
</form>
  
  <label for="template">This box will have the completed template in it ready to copy:</label>
  <input type="text" id="template" name="template"><br><br>

</body>
</html>

What I need to do (to remind me as well as get some assistance on):

  • When someone selects either "terminating at" or "starting at" from the drop down box, a new box appears next to it where the user can type in the station name
    A development of this will be as the user is typing, it will automatically try and fill in matches using either a proper spelling (such as London St Pancras, or users can type in a short code and it'll fill in the actual name - SPT for St Pancras in this example).
     
  • As the user is filling in details, it'll automatically fill in the box at the bottom with the text as a sentence so the user can copy it and paste it in an email.
  • 2 months later...

How comfortable are you with coding? If you want to go to town on that you can write a web service to do it, which you have said is out of scope for now. A static HTML file and JavaScript that contains all of the logic as well as the station names and lookups, while performing the searching without any sort of web query would be the next approach - do you have a web server to run this from or are you looking at running it off disk locally?

If you are less comfortable with programming, then doing this in Microsoft Access or FileMaker Pro could be a sensible compromise and would allow you to do most of what you asked - I appreciate that you said no database at this point, however if you have MS Office, it's pretty point and click vs SQL Server or MySQL.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • never mind the video had a couple swear words... gosh it was funny!
    • It's expensive, but I bet it will still sell out just like the Steam Deck and the Steam Controller
    • This is listed as a preview in WU for me. I usually don't grab them as previews; what's your opinion on it so far?
    • Pale Moon 34.3.1 by Razvan Serea Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows, Linux and Android, focusing on efficiency and ease of use. Make sure to get the most out of your browser! Pale Moon offers you a browsing experience in a browser completely built from its own, independently developed source that has been forked off from Firefox/Mozilla code, with carefully selected features and optimizations to improve the browsers speed, resource use, stability and user experience, while offering full customization and a growing collection of extensions and themes to make the browser truly your own. Features: Optimized for modern processors Based on proprietary optimized layout engine (Goanna) Safe: forked from mature Mozilla code and regularly updated Secure: Additional security features and security-aware development Supported by our user community, and fully non-profit Familiar, efficient, fully customizable interface Support for full themes: total freedom over any elements design Support for easily-created lightweight themes (skins) Smooth and speedy page drawing and script processing Increased stability: experience fewer browser crashes Support for many Firefox extensions Support for a growing number of Pale Moon exclusive extensions Extensive and growing support for HTML5 and CSS3 Many customization and configuration options Pale Moon 34.3.1 changelog: Pale Moon will now exclude local resources from CSP checks, aligning it with the rest of CSP handling. Fixed an issue where the devtools JSON viewer would, in some cases, make erroneous requests to remote servers. Updated libpng to 1.6.58+apng. Updated NSS to 3.90.12 (UXP), addressing multiple security issues. Fixed several intermittent and rare crashes. Security issues addressed: CVE-2026-12318 (CWE-125), CVE-2026-12322, CVE-2026-12292 (DiD), and multiple other issues that did not have a CVE designation at the time of patching. Download: Pale Moon (64-bit) | Portable 64-bit | ~40.0 MB (Freeware) Download: Pale Moon (32-bit) | Portable 32-bit Links: Pale Moon Homepage | Add-ons | Themes | Extensions | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
    • First Post
      Tom Schmidt earned a badge
      First Post
    • One Month Later
      D0nn13 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      416
    2. 2
      +Edouard
      176
    3. 3
      PsYcHoKiLLa
      124
    4. 4
      Michael Scrip
      77
    5. 5
      Xenon
      76
  • Tell a friend

    Love Neowin? Tell a friend!