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.