Welcome!
This is an example of a form created by my form generation engine. I was to develop several forms for a manufacturing plant
as they switched to a statisically controlled process from a paper/excel method of storage. The forms were to store the data,
allow modifications of the data, as well as to allow each production station see how close they were to hitting their goal.
Goals can be modified
here, but editing of goals has been disabled for this demo. The password to modify historic data is 'test'.
There were evolving requirements for the fields which needed to be collected, as well as what the forms needed to do themselves.
So to make my job easier, I made each form a configuration file, and wrote an engine to generate the forms on the fly. Here you can
see an example of a form generated by that engine.
The configuration file was composed of PHP variables, which were then imported and used for the generation of the form.
Below is a description of the configuration file variables:
$db_insert = The database to insert the data into
$table_insert = The table to insert the data into
$form_name = The display name of the form for end users
The fields for the form were generated by the following array structure:
$form[0][0] = array("database_column_name", "Display Name", "Input type & Options(if necessary)", "Steps-For multi-step forms");
$form[0][1] = array("database_column_name", "Display Name", "Input type & Options(if necessary)", "Steps-For multi-step forms");
The first index of the array was for which section the field belonged to, and the second index was for which field of that
section was being defined. The form you're viewing has 11 sections. To speed up form generation, the default for Input Type & Options was a textfield.
Each section is basically a cluster of fields returned as a HTML table, which then can be placed and styled as needed.
$how_many = Is an array that has a value for each section defining how many times it will be displayed for collection, most times it was one,
but say for instance if you're inputting transactions, and want to allow the user to input 20 entries at once, that would be defined here.
$specialCheckFields = Is an array of index pairs for fields that requiried special JS Checking. (i.e. "0,1" would set special checking for Section 0,
Field 1)
Feel free to add data in the form to see how it affects the progress bars.