Sub main:
Parameters:
Takes no arguments, returns no values.
1 means open an existing form.
2 means add an element to the end of the current form.
3 means remove an element by number from the current form. This
is not too hot, since that means that they have to count the HTML
form tags on the command line version, but in the GUI version,
which is all we are really concerned with making easy when it comes
down to it, the tags will number themselves. No problem.
4 means that we want to modify an element on the current form,
by number.
5 means display the form.
Sub printMenu:
Parameters:
- String representing the name of the form being modified
Return values:
- Integer representing one of the following: 1 = Open form. 2 = Add element. 3 = Remove element. 4 = Modify element. 5 = Display the current form. 9 = Quit.
Sub getInput:
Parameters:
None
Return values:
- returns a number in the set [1-5, 9], corresponding to the menu options found in printMenu
Sub openForm:
Parameters:
None
Return values:
- returns a filename that can be used as a current form
Sub duplicateName:
Parameters:
- String representing the name of the new attempted form element to be checked against the database to see if it is a duplicate of an existing name.
Return values:
- 1 if there is a duplicate name in the table, 0 if not.
Sub addElement:
Parameters:
- : filename for a .html forms file that needs to have an element added to it at the end.
Sub removeElement:
Parameters:
- filename for a .html forms file that needs to have an element removed from it.
Sub modifyElement:
Parameters:
- filename for a .html forms file that needs to have one element modified in some way.
Sub displayForm:
Parameters:
- filename for a .html forms file that is to be displayed.